diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-05-23 11:40:23 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-05-23 20:24:37 +0200 |
commit | b803993b6d99423c8c1e01e7e206e3916a98d5d5 (patch) | |
tree | a8bf0fb6ac9326845386c80ab9a307f7f92fcf40 | |
parent | 2a1fd3c84ef9b5d1daf32fd3cbfebff3c5996ef4 (diff) | |
download | ffmpeg-b803993b6d99423c8c1e01e7e206e3916a98d5d5.tar.gz |
avcodec/libopusenc: Don't free user-provided AVPacket
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r-- | libavcodec/libopusenc.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c index 7c025a66d7..13017ac323 100644 --- a/libavcodec/libopusenc.c +++ b/libavcodec/libopusenc.c @@ -503,7 +503,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) { @@ -512,7 +511,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); |