qtdemux: stbl_index is valid from 0 onwards

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.
This commit is contained in:
Thiago Santos 2015-04-06 18:55:08 -03:00
parent 2fde2011b2
commit aeb4d32363

View 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);