jpegparse: log id when skipping an unhandled APP marker

https://bugzilla.gnome.org/show_bug.cgi?id=626618
This commit is contained in:
Víctor Manuel Jáquez Leal 2010-11-21 15:05:43 +01:00 committed by Stefan Kost
parent a1f77eda32
commit 81991e3323

View file

@ -520,11 +520,24 @@ gst_jpeg_parse_skip_marker (GstJpegParse * parse,
if (!gst_byte_reader_get_uint16_be (reader, &size))
return FALSE;
#ifndef GST_DISABLE_DEBUG
/* We'd pry the id of the skipped application segment */
if (marker >= APP0 && marker <= APP15) {
const gchar *id_str = NULL;
if (!gst_byte_reader_peek_string_utf8 (reader, &id_str))
return FALSE;
GST_LOG_OBJECT (parse, "unhandled marker %x: '%s' skiping %u bytes",
marker, id_str ? id_str : "(NULL)", size);
}
#else
GST_LOG_OBJECT (parse, "unhandled marker %x skiping %u bytes", marker, size);
#endif // GST_DISABLE_DEBUG
if (!gst_byte_reader_skip (reader, size - 2))
return FALSE;
GST_LOG_OBJECT (parse, "unhandled marker %x skiping %u bytes", marker, size);
return TRUE;
}