From: Jochen Henneberg Date: Sat, 27 Oct 2018 11:28:56 +0000 (+0200) Subject: flacdec: Reset decoder on set_format() X-Git-Tag: 1.19.3~509^2~1286 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5d71c597df80f39c819afa7adc5840482fe89de;p=platform%2Fupstream%2Fgstreamer.git flacdec: Reset decoder on set_format() Any call to set_format() could mean that the stream type changed so we reset the decoder and mark got_headers FALSE. --- diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c index 15f19e6..b34baf1 100644 --- a/ext/flac/gstflacdec.c +++ b/ext/flac/gstflacdec.c @@ -263,6 +263,9 @@ gst_flac_dec_set_format (GstAudioDecoder * dec, GstCaps * caps) gst_adapter_clear (flacdec->adapter); } + FLAC__stream_decoder_reset (flacdec->decoder); + flacdec->got_headers = FALSE; + num = gst_value_array_get_size (headers); for (i = 0; i < num; ++i) { const GValue *header_val;