From: Arnaud Vrac <avrac@freebox.fr>
Date: Wed, 16 Jan 2013 19:13:20 +0100
Subject: qtdemux: hack to handle badly muxed files

The 'free' atom size just before 'mdat' is short of 8 bytes, so no data
is found. Try to resync in this case.

diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -4142,6 +4142,12 @@ gst_qtdemux_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * inbuf)
           ret = GST_FLOW_ERROR;
           break;
         }
+        if (fourcc == 0) {
+          /* fix some files with short free atom size */
+          demux->offset += 8;
+          gst_adapter_flush (demux->adapter, 8);
+          break;
+        }
         if (fourcc == FOURCC_mdat) {
           if (demux->n_streams > 0) {
             /* we have the headers, start playback */
