mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
jpegparse: fix skipping extra 0xff markers
In particular, this makes the jpegparse unit test pass again. Also add a debug statement. Fixes #622690.
This commit is contained in:
parent
3e4eacce3c
commit
3a1d0b7a0f
1 changed files with 3 additions and 1 deletions
|
@ -329,7 +329,7 @@ gst_jpeg_parse_get_image_length (GstJpegParse * parse)
|
|||
/* may have marker, but could have been resyncng */
|
||||
resync = resync || parse->priv->last_resync;
|
||||
/* Skip over extra 0xff */
|
||||
while ((noffset > 0) && ((value & 0xff) == 0xff)) {
|
||||
while ((noffset >= 0) && ((value & 0xff) == 0xff)) {
|
||||
noffset++;
|
||||
noffset =
|
||||
gst_adapter_masked_scan_uint32_peek (adapter, 0x0000ff00, 0x0000ff00,
|
||||
|
@ -833,6 +833,8 @@ gst_jpeg_parse_chain (GstPad * pad, GstBuffer * buf)
|
|||
if (len == 0)
|
||||
return GST_FLOW_OK;
|
||||
|
||||
GST_LOG_OBJECT (parse, "parsed image of size %d", len);
|
||||
|
||||
/* now we have enough in the adapter to process a full jpeg image */
|
||||
ret = gst_jpeg_parse_push_buffer (parse, len);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue