flvmux: Add protection when unref GstFlvMuxPad

This is to avoid gst_object_unref: assertion 'object != NULL' failed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1843>
This commit is contained in:
Hou Qi 2022-03-03 14:22:10 +08:00 committed by GStreamer Marge Bot
parent 21f7889187
commit b11084f729

View file

@ -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) {