webrtcbin: Avoid access of freed memory

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2258>
This commit is contained in:
Sangchul Lee 2022-04-21 00:38:37 +09:00 committed by GStreamer Marge Bot
parent a1100bf559
commit c88a68c411

View file

@ -1828,7 +1828,6 @@ _find_codec_preferences (GstWebRTCBin * webrtc,
caps = _query_pad_caps (webrtc, rtp_trans, pad, filter, error);
}
gst_object_unref (pad);
if (*error)
goto out;
@ -1882,6 +1881,8 @@ _find_codec_preferences (GstWebRTCBin * webrtc,
out:
if (pad)
gst_object_unref (pad);
if (codec_preferences)
gst_caps_unref (codec_preferences);