mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 13:11:06 +00:00
avviddec: Fix AVPacket leak
av_packet_unref() does not release allocated memory. av_packet_free() is the correct free function. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6545>
This commit is contained in:
parent
984b1f413a
commit
ce4f0d5746
1 changed files with 2 additions and 2 deletions
|
@ -2277,10 +2277,10 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder,
|
||||||
GST_VIDEO_DECODER_STREAM_UNLOCK (ffmpegdec);
|
GST_VIDEO_DECODER_STREAM_UNLOCK (ffmpegdec);
|
||||||
if (avcodec_send_packet (ffmpegdec->context, packet) < 0) {
|
if (avcodec_send_packet (ffmpegdec->context, packet) < 0) {
|
||||||
GST_VIDEO_DECODER_STREAM_LOCK (ffmpegdec);
|
GST_VIDEO_DECODER_STREAM_LOCK (ffmpegdec);
|
||||||
av_packet_unref (packet);
|
av_packet_free (&packet);
|
||||||
goto send_packet_failed;
|
goto send_packet_failed;
|
||||||
}
|
}
|
||||||
av_packet_unref (packet);
|
av_packet_free (&packet);
|
||||||
GST_VIDEO_DECODER_STREAM_LOCK (ffmpegdec);
|
GST_VIDEO_DECODER_STREAM_LOCK (ffmpegdec);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
|
Loading…
Reference in a new issue