From 4a279f4499f28fb503d70c656ee5b456712056d9 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 10 Jan 2017 16:01:35 +0100 Subject: [PATCH] isomp4: Don't spam debug log with knonw/padding atoms Only output WARNING messages for atoms we don't know how to handle instead of for padding/known atoms we don't need to do any processing on https://bugzilla.gnome.org/show_bug.cgi?id=777095 --- gst/isomp4/fourcc.h | 1 + gst/isomp4/qtdemux.c | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/gst/isomp4/fourcc.h b/gst/isomp4/fourcc.h index 8dd70c44c9..2b86e5c148 100644 --- a/gst/isomp4/fourcc.h +++ b/gst/isomp4/fourcc.h @@ -220,6 +220,7 @@ G_BEGIN_DECLS #define FOURCC_stss GST_MAKE_FOURCC('s','t','s','s') #define FOURCC_stsz GST_MAKE_FOURCC('s','t','s','z') #define FOURCC_stts GST_MAKE_FOURCC('s','t','t','s') +#define FOURCC_styp GST_MAKE_FOURCC('s','t','y','p') #define FOURCC_subp GST_MAKE_FOURCC('s','u','b','p') #define FOURCC_subt GST_MAKE_FOURCC('s','u','b','t') #define FOURCC_text GST_MAKE_FOURCC('t','e','x','t') diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index f178301b6f..e105809674 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -6550,10 +6550,23 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force) GST_DEBUG_OBJECT (demux, "Parsing [sidx]"); qtdemux_parse_sidx (demux, data, demux->neededbytes); } else { - GST_WARNING_OBJECT (demux, - "Unknown fourcc while parsing header : %" GST_FOURCC_FORMAT, - GST_FOURCC_ARGS (fourcc)); - /* Let's jump that one and go back to initial state */ + switch (fourcc) { + case FOURCC_styp: + /* [styp] is like a [ftyp], but in fragment header. We ignore it for now + * FALLTHROUGH */ + case FOURCC_free: + /* [free] is a padding atom */ + GST_DEBUG_OBJECT (demux, + "Skipping fourcc while parsing header : %" GST_FOURCC_FORMAT, + GST_FOURCC_ARGS (fourcc)); + break; + default: + GST_WARNING_OBJECT (demux, + "Unknown fourcc while parsing header : %" GST_FOURCC_FORMAT, + GST_FOURCC_ARGS (fourcc)); + /* Let's jump that one and go back to initial state */ + break; + } } gst_adapter_unmap (demux->adapter); data = NULL;