flacdec: Caps may have changed on FLAC metadata change

If the decoder signals metadata change we need to update the output
format and negotiate with downstream elements.
This commit is contained in:
Jochen Henneberg 2018-10-27 13:36:16 +02:00 committed by Sebastian Dröge
parent a5d71c597d
commit d74f964407

View file

@ -489,6 +489,11 @@ gst_flac_dec_metadata_cb (const FLAC__StreamDecoder * decoder,
metadata->data.stream_info.sample_rate, metadata->data.stream_info.sample_rate,
metadata->data.stream_info.channels, position); metadata->data.stream_info.channels, position);
gst_audio_decoder_set_output_format (GST_AUDIO_DECODER (flacdec),
&flacdec->info);
gst_audio_decoder_negotiate (GST_AUDIO_DECODER (flacdec));
GST_DEBUG_OBJECT (flacdec, "blocksize: min=%u, max=%u", GST_DEBUG_OBJECT (flacdec, "blocksize: min=%u, max=%u",
flacdec->min_blocksize, flacdec->max_blocksize); flacdec->min_blocksize, flacdec->max_blocksize);
GST_DEBUG_OBJECT (flacdec, "sample rate: %u, channels: %u", GST_DEBUG_OBJECT (flacdec, "sample rate: %u, channels: %u",