[Bug 766177] Critical errors reported playing mp4 file with only xmp tags

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon May 9 14:30:01 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=766177

--- Comment #1 from David Plowman <dplowman at brightsign.biz> ---
I believe the problem lies in qtdemux_handle_xmp_taglist where having
qtdemux->tag_list NULL appears to cause this problem. Presumably all this means
is that the first tags we've encountered are xmp tags?

Anyway, I'm using the following patch locally and it seems to be working fine:

diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index e9c7a07..236f853 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -2373,7 +2373,7 @@ qtdemux_handle_xmp_taglist (GstQTDemux * qtdemux,
GstTagList * taglist,
 {
   /* Strip out bogus fields */
   if (xmptaglist) {
-    if (gst_tag_list_get_scope (taglist) == GST_TAG_SCOPE_GLOBAL) {
+    if (taglist && gst_tag_list_get_scope (taglist) == GST_TAG_SCOPE_GLOBAL) {
       gst_tag_list_remove_tag (xmptaglist, GST_TAG_VIDEO_CODEC);
       gst_tag_list_remove_tag (xmptaglist, GST_TAG_AUDIO_CODEC);
     } else {
@@ -2383,8 +2383,12 @@ qtdemux_handle_xmp_taglist (GstQTDemux * qtdemux,
GstTagList * taglist,
     GST_DEBUG_OBJECT (qtdemux, "Found XMP tags %" GST_PTR_FORMAT, xmptaglist);

     /* prioritize native tags using _KEEP mode */
-    gst_tag_list_insert (taglist, xmptaglist, GST_TAG_MERGE_KEEP);
-    gst_tag_list_unref (xmptaglist);
+    if (taglist) {
+      gst_tag_list_insert (taglist, xmptaglist, GST_TAG_MERGE_KEEP);
+      gst_tag_list_unref (xmptaglist);
+    } else {
+      qtdemux->tag_list = xmptaglist;
+    }
   }
 }

Does that seem reasonable? Of course, I'm not totally sure what I can infer
about the scope of a tag list that is empty...

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list