qtdemux: stbl_index is valid from 0 onwards
authorThiago Santos <thiagoss@osg.samsung.com>
Mon, 6 Apr 2015 21:55:08 +0000 (18:55 -0300)
committerThiago Santos <thiagoss@osg.samsung.com>
Mon, 6 Apr 2015 22:29:03 +0000 (19:29 -0300)
It indicates the last sample parsed, not the next one to parse.
As it starts in -1, any value from 0 onwards means that it has
some valid data.

gst/isomp4/qtdemux.c

index d0e391e..4bcf91e 100644 (file)
@@ -9470,7 +9470,7 @@ qtdemux_prepare_streams (GstQTDemux * qtdemux)
         break;
       ++sample_num;
     }
-    if (stream->n_samples > 0 && stream->stbl_index > 0) {
+    if (stream->n_samples > 0 && stream->stbl_index >= 0) {
       stream->first_duration = stream->samples[0].duration;
       GST_LOG_OBJECT (qtdemux, "stream %d first duration %u",
           stream->track_id, stream->first_duration);