From 8548b2c777453add21bcf155956f4058a5bded08 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Tue, 15 Nov 2011 13:23:56 +0000 Subject: [PATCH] flacdec: fix spurious timestamp discontinuity We need to tell the base class that we're dropping buffers, so it drops the input timestamps corresponding to these. Otherwise, the first actual audio buffers we output will be stamped with those - GST_CLOCK_TIMESTAMP_NONE. That mismatch between input buffer count and output buffer count will stay while playing. With enough headers and long enough buffer durations, the sink will have played enough before receiving the first valid timestamp (usually 0), and will trigger an audible discontinuity. --- ext/flac/gstflacdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c index bb4b53cf68..9121181093 100644 --- a/ext/flac/gstflacdec.c +++ b/ext/flac/gstflacdec.c @@ -711,6 +711,7 @@ gst_flac_dec_handle_frame (GstAudioDecoder * audio_dec, GstBuffer * buf) if (!got_audio_frame) { GST_INFO_OBJECT (dec, "dropping in-stream header, %d bytes", size); + gst_audio_decoder_finish_frame (audio_dec, NULL, 1); return GST_FLOW_OK; }