[FFmpeg-cvslog] avcodec/libopusenc: Don't free user-provided AVPacket
Andreas Rheinhardt
git at videolan.org
Sat May 23 21:53:32 EEST 2020
ffmpeg | branch: release/3.2 | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Sat May 23 11:40:23 2020 +0200| [c70ecbdef0174c3c800bb1d8bb3ed5dbe4fa0670] | committer: Andreas Rheinhardt
avcodec/libopusenc: Don't free user-provided AVPacket
Reviewed-by: James Almer <jamrial at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
(cherry picked from commit b803993b6d99423c8c1e01e7e206e3916a98d5d5)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c70ecbdef0174c3c800bb1d8bb3ed5dbe4fa0670
---
libavcodec/libopusenc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c
index c40fcde7ba..ee91cd9653 100644
--- a/libavcodec/libopusenc.c
+++ b/libavcodec/libopusenc.c
@@ -482,7 +482,6 @@ static int libopus_encode(AVCodecContext *avctx, AVPacket *avpkt,
// Check if subtraction resulted in an overflow
if ((discard_padding < opus->opts.packet_size) != (avpkt->duration > 0)) {
av_packet_unref(avpkt);
- av_free(avpkt);
return AVERROR(EINVAL);
}
if (discard_padding > 0) {
@@ -491,7 +490,6 @@ static int libopus_encode(AVCodecContext *avctx, AVPacket *avpkt,
10);
if(!side_data) {
av_packet_unref(avpkt);
- av_free(avpkt);
return AVERROR(ENOMEM);
}
AV_WL32(side_data + 4, discard_padding);
More information about the ffmpeg-cvslog
mailing list