[Bug 764637] qtdemux: Ensure stream duration by using stts box

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Apr 13 13:35:28 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=764637

--- Comment #8 from Seungha Yang <sh.yang at lge.com> ---
(In reply to Thiago Sousa Santos from comment #4)
> Review of attachment 325420 [details] [review]:
> 
> Adding this has the downside of increasing startup time as we loop over the
> stts table. I'm not sure it is worth doing this double check.
> 
> That said, most stts entries are very short as the frames have a constant
> duration but also most files should have a correct duration field in the
> track headers.
> If we do this, perhaps we should set an upper bound to only do this check if
> the stts is small enough to avoid delaying startup too much?
> 

I agree with your opinion that this method can cause startup delay. So, I
modified that checking stts entry only if a file possibly corrupted.
That is, check difference file duration and stream duration.

> ::: gst/isomp4/qtdemux.c
> @@ +7646,3 @@
> +      stream->stts_total_duration += (guint64) (samples * duration);
> +    }
> +    gst_byte_reader_set_pos (&stream->stts, pos);
> 
> shouldn't this be inside the block as well?

I use byte reader in order to accumulate each sample duration
That is to roll back the byte reader position.

> 
> Also maybe put this all in a separate function with a clear name to give a
> hint to code readers on what it is doing.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list