From b11084f7290eb8e4febf7a37617aa55719d37835 Mon Sep 17 00:00:00 2001 From: Hou Qi Date: Thu, 3 Mar 2022 14:22:10 +0800 Subject: [PATCH] flvmux: Add protection when unref GstFlvMuxPad This is to avoid gst_object_unref: assertion 'object != NULL' failed. Part-of: --- subprojects/gst-plugins-good/gst/flv/gstflvmux.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/flv/gstflvmux.c b/subprojects/gst-plugins-good/gst/flv/gstflvmux.c index 6ce6413e5b..cb4db020ea 100644 --- a/subprojects/gst-plugins-good/gst/flv/gstflvmux.c +++ b/subprojects/gst-plugins-good/gst/flv/gstflvmux.c @@ -2080,8 +2080,10 @@ gst_flv_mux_aggregate (GstAggregator * aggregator, gboolean timeout) gst_buffer_unref (buffer); buffer = NULL; } - gst_object_unref (best); - best = NULL; + if (best) { + gst_object_unref (best); + best = NULL; + } } if (best) {