The size of a marker segment is defined to be exclusive of any initial
marker code. So, fix the size for SOI, EOI and APPn segments but also
the size of any possible segment that is usually "reserved" or not
explicitly defined.
https://bugzilla.gnome.org/show_bug.cgi?id=707447
if (marker)
*marker = br->data[ofs + 1];
- gst_byte_reader_skip (br, ofs - br->byte + 2);
+ gst_byte_reader_skip_unchecked (br, ofs - br->byte);
return TRUE;
}
return FALSE;
}
+ gst_byte_reader_skip_unchecked (&br, 2);
seg->offset = offset + gst_byte_reader_get_pos (&br);
seg->size = -1;
case GST_JPEG_MARKER_SOI:
case GST_JPEG_MARKER_EOI:
fixed_size_segment:
- seg->size = 2;
+ seg->size = 0;
break;
case (GST_JPEG_MARKER_SOF_MIN + 0): /* Lf */