GNOME Bugzilla – Bug 531672
[qtdemux] does not handle files with edit lists correctly anymore
Last modified: 2008-05-26 13:51:45 UTC
Some files can generate an infinite loop and the generated newsegments event do not really reflect the edit list information. Please see this file as an example : http://dolphy-tech.net/files/Iron%20Man.mov
Created attachment 110437 [details] [review] Fix segment selection and newsegment generation This makes sure we are not looping over the same segment in an infinite loop by using the next sample as our time_position instead of segment->stop. newsegment generation is handled differently to reflect the edit list values.
The patch does not seem to do the right thing, it changes the segment values to something weird and references samples which could be uninitialized. I'll try to find what's wrong and find a fix.
This change broke it: http://webcvs.freedesktop.org/gstreamer/gst-plugins-good/gst/qtdemux/qtdemux.c?r1=1.208&r2=1.209 The reason is that the range check for what segment to activate is wrong, in _find_segment: -if (segment->time <= time_position && time_position <= segment->stop_time) { +if (segment->time <= time_position && time_position < segment->stop_time) { If the time_position == ->stop_time, we must activate the next segment. I understand that for reverse playback, these ranges must likely be reversed.
* gst/qtdemux/qtdemux.c: (gst_qtdemux_find_segment), (gst_qtdemux_activate_segment): Unbreak segment activation again. Fixes #531672.