From 659ba806f1e1458f78e56f59865111c2dea57a6d Mon Sep 17 00:00:00 2001 From: Hou Qi Date: Wed, 21 Aug 2019 19:04:56 +0800 Subject: [PATCH] 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. --- gst-libs/gst/audio/gstaudiodecoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.7.4