audiodecoder: accept dropped buffers before we know the format

This allows flacdec to not emit audio for headers, while allowing
the base audio decoder to keep its timestamps in sync.
This commit is contained in:
Vincent Penquerc'h 2011-11-15 13:29:31 +00:00
parent a23dff1fbb
commit f17f918b75

View file

@ -739,7 +739,8 @@ gst_audio_decoder_finish_frame (GstAudioDecoder * dec, GstBuffer * buf,
ctx = &dec->priv->ctx;
/* must know the output format by now */
g_return_val_if_fail (GST_AUDIO_INFO_IS_VALID (&ctx->info), GST_FLOW_ERROR);
g_return_val_if_fail (buf == NULL || GST_AUDIO_INFO_IS_VALID (&ctx->info),
GST_FLOW_ERROR);
GST_LOG_OBJECT (dec, "accepting %d bytes == %d samples for %d frames",
buf ? GST_BUFFER_SIZE (buf) : -1,