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 21:38:21 +0200 |
commit | 49a9b454b389c18b8ebf65e91cb31c768c10802d (patch) | |
tree | 6159140e1ad995e41db71d8925bc13a7c02dbde1 | |
parent | f93e026b642431e796775345df2483ae283283f2 (diff) | |
download | ffmpeg-49a9b454b389c18b8ebf65e91cb31c768c10802d.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 a170b711c6..ec3acb5f92 100644 --- a/libavcodec/libopusenc.c +++ b/libavcodec/libopusenc.c @@ -362,7 +362,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_free_packet(avpkt); - av_free(avpkt); return AVERROR(EINVAL); } if (discard_padding > 0) { @@ -371,7 +370,6 @@ static int libopus_encode(AVCodecContext *avctx, AVPacket *avpkt, 10); if(!side_data) { av_free_packet(avpkt); - av_free(avpkt); return AVERROR(ENOMEM); } AV_WL32(side_data + 4, discard_padding); |