v4l2videoenc: Fix negotiation caps leak

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/649>
This commit is contained in:
Nicolas Dufresne 2020-06-25 16:46:23 -04:00 committed by GStreamer Merge Bot
parent 4f555ecf8e
commit dbdbcfe7ff

View file

@ -548,6 +548,9 @@ gst_v4l2_video_enc_negotiate (GstVideoEncoder * encoder)
if (gst_caps_foreach (allowed_caps, negotiate_profile_and_level, &ctx)) {
goto no_profile_level;
}
gst_caps_unref (allowed_caps);
allowed_caps = NULL;
}
if (codec->profile_cid && !ctx.profile) {