From 81991e3323c2e2a84835017e6437ac037d66a367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Sun, 21 Nov 2010 15:05:43 +0100 Subject: [PATCH] jpegparse: log id when skipping an unhandled APP marker https://bugzilla.gnome.org/show_bug.cgi?id=626618 --- gst/jpegformat/gstjpegparse.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/gst/jpegformat/gstjpegparse.c b/gst/jpegformat/gstjpegparse.c index a88ba06632..1325bacf87 100644 --- a/gst/jpegformat/gstjpegparse.c +++ b/gst/jpegformat/gstjpegparse.c @@ -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; }