From: Hou Qi Date: Wed, 21 Aug 2019 11:04:56 +0000 (+0800) Subject: audiodecoder: fix ctitical info assertion 'GST_IS_CAPS (dec->priv->ctx.caps)' failed X-Git-Tag: accepted/tizen/unified/20220217.153506~2^2~10^2~9^2~16^2~1^2~42^2~1^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=659ba806f1e1458f78e56f59865111c2dea57a6d;p=platform%2Fupstream%2Fgstreamer.git audiodecoder: fix ctitical info assertion 'GST_IS_CAPS (dec->priv->ctx.caps)' failed Matroskademux will send gap event when lag of video and audio is over 3 seconds. audiodecoder needs to handle gap event and set default output caps. Only audio info is set, while output caps is ignored. This cause the assertion failed. Need to fill output caps in gst_audio_decoder_negotiate_default_caps() with negotiated caps to avoid critical info printed when check it later. --- diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c index 15d8038..c3d445b 100644 --- a/gst-libs/gst/audio/gstaudiodecoder.c +++ b/gst-libs/gst/audio/gstaudiodecoder.c @@ -2195,11 +2195,11 @@ gst_audio_decoder_negotiate_default_caps (GstAudioDecoder * dec) GST_OBJECT_LOCK (dec); dec->priv->ctx.info = info; + dec->priv->ctx.caps = caps; GST_OBJECT_UNLOCK (dec); GST_INFO_OBJECT (dec, "Chose default caps %" GST_PTR_FORMAT " for initial gap", caps); - gst_caps_unref (caps); return TRUE;