flacdec: don't send second newsegment event in framed mode, fixes long playback delay

Don't send another newsegment event if the upstream muxer/parser has already
sent one (otherwise the sink will wait for $duration before starting playback).
Fixes long delay until playback starts with flac-in-ogg files.

Fixes #610959.
This commit is contained in:
Tim-Philipp Müller 2010-03-08 16:47:04 +00:00
parent 66709a7a68
commit de56a874ae

View file

@ -578,7 +578,9 @@ gst_flac_dec_metadata_cb (const FLAC__StreamDecoder * decoder,
GST_DEBUG_OBJECT (flacdec, "total samples = %" G_GINT64_FORMAT, samples); GST_DEBUG_OBJECT (flacdec, "total samples = %" G_GINT64_FORMAT, samples);
if (samples > 0) { /* in framed mode the demuxer/parser upstream has already pushed a
* newsegment event in TIME format which we've passed on */
if (samples > 0 && !flacdec->framed) {
gint64 duration; gint64 duration;
gst_segment_set_duration (&flacdec->segment, GST_FORMAT_DEFAULT, gst_segment_set_duration (&flacdec->segment, GST_FORMAT_DEFAULT,