mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
jpegparse: skip all APP markers, excepting APP1
https://bugzilla.gnome.org/show_bug.cgi?id=626618
This commit is contained in:
parent
51e57d439e
commit
a1f77eda32
1 changed files with 4 additions and 16 deletions
|
@ -669,22 +669,7 @@ gst_jpeg_parse_read_header (GstJpegParse * parse, GstBuffer * buffer)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case APP0:
|
||||
case APP2:
|
||||
case APP13:
|
||||
case APP14:
|
||||
case APP15:{
|
||||
const gchar *id_str;
|
||||
if (!gst_byte_reader_get_uint16_be (&reader, &size))
|
||||
goto error;
|
||||
if (!gst_byte_reader_get_string_utf8 (&reader, &id_str))
|
||||
goto error;
|
||||
if (!gst_byte_reader_skip (&reader, size - 3 - strlen (id_str)))
|
||||
goto error;
|
||||
GST_LOG_OBJECT (parse, "unhandled marker %x: '%s' skiping %u bytes",
|
||||
marker, id_str, size - 2);
|
||||
break;
|
||||
}
|
||||
|
||||
case DHT:
|
||||
case DQT:
|
||||
/* Ignore these codes */
|
||||
|
@ -728,6 +713,9 @@ gst_jpeg_parse_read_header (GstJpegParse * parse, GstBuffer * buffer)
|
|||
if (!gst_jpeg_parse_skip_marker (parse, &reader, marker))
|
||||
goto error;
|
||||
#endif
|
||||
} else if (marker >= APP0 && marker <= APP15) {
|
||||
if (!gst_jpeg_parse_skip_marker (parse, &reader, marker))
|
||||
goto error;
|
||||
} else {
|
||||
GST_WARNING_OBJECT (parse, "unhandled marker %x, leaving", marker);
|
||||
/* Not SOF or SOI. Must not be a JPEG file (or file pointer
|
||||
|
|
Loading…
Reference in a new issue