avvidenc: Don't leak AVPacket on EOF

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3390>
This commit is contained in:
Edward Hervey 2022-11-12 09:54:31 +01:00 committed by Edward Hervey
parent 47833c8b36
commit 6582cd514a

View file

@ -673,6 +673,7 @@ gst_ffmpegvidenc_receive_packet (GstFFMpegVidEnc * ffmpegenc,
g_slice_free (AVPacket, pkt);
goto done;
} else if (res == AVERROR_EOF) {
g_slice_free (AVPacket, pkt);
ret = GST_FLOW_EOS;
goto done;
} else if (res < 0) {