1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/encode: free non-referenced packets' side data in the old encode API functions

Fixes memleaks introduced by a22c6a4796.
This commit is contained in:
James Almer 2017-10-02 18:58:39 -03:00
parent b591329c3a
commit 712ee85816

View File

@ -227,6 +227,7 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
ret = av_packet_ref(&tmp, avpkt);
if (ret < 0)
return ret;
av_packet_unref(avpkt);
*avpkt = tmp;
}
}
@ -325,6 +326,7 @@ int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
ret = av_packet_ref(&tmp, avpkt);
if (ret < 0)
return ret;
av_packet_unref(avpkt);
*avpkt = tmp;
}
}