diff -ur hei/gst-plugins-good1.0-1.4.5/./gst/isomp4/qtdemux.c gst-plugins-good1.0-1.4.5/./gst/isomp4/qtdemux.c
--- hei/gst-plugins-good1.0-1.4.5/./gst/isomp4/qtdemux.c	2014-10-19 13:43:59.000000000 +0200
+++ gst-plugins-good1.0-1.4.5/./gst/isomp4/qtdemux.c	2015-07-26 01:28:49.282715970 +0200
@@ -2691,9 +2691,12 @@
   if (G_UNLIKELY (!*stream))
     goto unknown_stream;
 
-  if (flags & TF_BASE_DATA_OFFSET)
+  if (flags & TF_BASE_DATA_OFFSET) {
     if (!gst_byte_reader_get_uint64_be (tfhd, (guint64 *) base_offset))
       goto invalid_track;
+  } else if (flags & TF_DEFAULT_BASE_IS_MOOF) {
+    *base_offset = qtdemux->moof_offset;
+  }
 
   /* obtain stream defaults */
   qtdemux_parse_trex (qtdemux, *stream,
@@ -4813,6 +4816,9 @@
             guint64 prev_offset;
 
             GST_DEBUG_OBJECT (demux, "Parsing [moof]");
+            if (!demux->moof_offset) {
+              demux->moof_offset = demux->offset;
+            }
 
             /*
              * The timestamp of the moof buffer is relevant as some scenarios
@@ -4975,6 +4981,8 @@
           } else {
             GST_DEBUG_OBJECT (demux, "data atom emptied; resuming atom scan");
             /* so we are dropping more than left in this atom */
+            gst_adapter_flush (demux->adapter, demux->neededbytes);
+            demux->offset += demux->mdatleft;
             demux->todrop -= demux->mdatleft;
             demux->neededbytes -= demux->mdatleft;
             demux->mdatleft = 0;
diff -ur hei/gst-plugins-good1.0-1.4.5/./gst/isomp4/qtdemux_types.h gst-plugins-good1.0-1.4.5/./gst/isomp4/qtdemux_types.h
--- hei/gst-plugins-good1.0-1.4.5/./gst/isomp4/qtdemux_types.h	2014-10-19 13:41:09.000000000 +0200
+++ gst-plugins-good1.0-1.4.5/./gst/isomp4/qtdemux_types.h	2015-07-26 01:28:49.282715970 +0200
@@ -62,7 +62,8 @@
   TF_DEFAULT_SAMPLE_DURATION  = 0x000008,   /* default-sample-duration-present */
   TF_DEFAULT_SAMPLE_SIZE      = 0x000010,   /* default-sample-size-present */
   TF_DEFAULT_SAMPLE_FLAGS     = 0x000020,   /* default-sample-flags-present */
-  TF_DURATION_IS_EMPTY        = 0x100000    /* duration-is-empty */
+  TF_DURATION_IS_EMPTY        = 0x010000,   /* duration-is-empty */
+  TF_DEFAULT_BASE_IS_MOOF     = 0x020000    /* default-base-is-moof */
 };
 
 enum TrFlags
