streamsynchronizer: don't send gap events with huge bogus durations when advancing...
authorTim-Philipp Müller <tim@centricular.net>
Mon, 26 Nov 2012 18:41:07 +0000 (18:41 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Mon, 26 Nov 2012 19:03:38 +0000 (19:03 +0000)
commit7c89a7298a1c7e6f411bfdd18db057e87045a47e
tree1db44996cc93f188abc6b8832e983a73659ce4e5
parent601aabdf9c0723b92339947e965209f66604f397
streamsynchronizer: don't send gap events with huge bogus durations when advancing EOS streams

When the input buffers for a stream don't have a duration set,
timestamp_end might still be GST_CLOCK_TIME_NONE. When advancing
EOSed streams via GAP events (with other streams not yet EOS), we
would then use the invalid timestamp_end to calculate the duration
of the gap. This in turn would make baseaudiosink abort, because it
would try to allocate memory for a trizillion samples.

So if buffers don't have a duration set, assume a duration of
one second for stream catch-up purposes, just so we can still
continue to catch up in those cases. And make sure that
timestamp_end is valid before doing calculations with it.

http://bugzilla.gnome.org/show_bug.cgi?id=678530
gst/playback/gststreamsynchronizer.c