summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2018-02-09 08:54:05 +0100
committerEdward Hervey <bilboed@bilboed.com>2018-02-09 09:00:46 +0100
commit357d77cf5528c0b66808e4788b1f98d2560949cf (patch)
tree179cd7452e7832b0f7b15531bfa74e365fc056f1
parentb415358c7e18ae0b0012207cfde640e83d483c56 (diff)
qtdemux: Cope with difference between QTFF and ISO BMFF specs
The 'meta' atom is defined differently in QTFF and BMFF, so try to guess which spec the current stream applies to by looking at the major file type.
-rw-r--r--gst/isomp4/qtdemux.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index 4fda82a82..3ec41b91d 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -7521,7 +7521,13 @@ qtdemux_parse_node (GstQTDemux * qtdemux, GNode * node, const guint8 * buffer,
case FOURCC_meta:
{
GST_DEBUG_OBJECT (qtdemux, "parsing meta atom");
- qtdemux_parse_container (qtdemux, node, buffer + 12, end);
+ /* You are reading this correctly. QTFF specifies that the
+ * metadata atom is a short atom, whereas ISO BMFF specifies
+ * it's a full atom. joy joy joy */
+ if (qtdemux->major_brand == FOURCC_qt__)
+ qtdemux_parse_container (qtdemux, node, buffer + 8, end);
+ else
+ qtdemux_parse_container (qtdemux, node, buffer + 12, end);
break;
}
case FOURCC_mp4s: