summaryrefslogtreecommitdiff
path: root/gst/jpegformat
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2010-11-21 15:05:43 +0100
committerStefan Kost <ensonic@users.sf.net>2011-04-11 10:37:57 +0300
commit81991e3323c2e2a84835017e6437ac037d66a367 (patch)
tree41dd66a44b2bc33f8dc8fe13edf918db5a5c53e5 /gst/jpegformat
parenta1f77eda32e7f981ee84d729d69f086c47acec50 (diff)
downloadgstreamer-plugins-bad-81991e3323c2e2a84835017e6437ac037d66a367.tar.gz
jpegparse: log id when skipping an unhandled APP marker
https://bugzilla.gnome.org/show_bug.cgi?id=626618
Diffstat (limited to 'gst/jpegformat')
-rw-r--r--gst/jpegformat/gstjpegparse.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/gst/jpegformat/gstjpegparse.c b/gst/jpegformat/gstjpegparse.c
index a88ba0663..1325bacf8 100644
--- a/gst/jpegformat/gstjpegparse.c
+++ b/gst/jpegformat/gstjpegparse.c
@@ -520,10 +520,23 @@ gst_jpeg_parse_skip_marker (GstJpegParse * parse,
if (!gst_byte_reader_get_uint16_be (reader, &size))
return FALSE;
- if (!gst_byte_reader_skip (reader, size - 2))
- 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;
return TRUE;
}