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:40:52 +0200 |
commit | 2becd7548a99637b7e90704d10f5bd40ee8935d0 (patch) | |
tree | 0021b7d90e10fe515f19253f06c40f5ba4144d00 | |
parent | e4c8d7d5da38e2a8bafb8064413c4027a258f688 (diff) | |
download | ffmpeg-2becd7548a99637b7e90704d10f5bd40ee8935d0.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>
(cherry picked from commit b803993b6d99423c8c1e01e7e206e3916a98d5d5)
-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 4ae81b0bb2..1a78f547d8 100644 --- a/libavcodec/libopusenc.c +++ b/libavcodec/libopusenc.c @@ -493,7 +493,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) { @@ -502,7 +501,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); |