diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-05-23 12:11:30 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-05-23 20:47:33 +0200 |
commit | 1a577c59d093db9645fdeb2bd7a113c0e0432185 (patch) | |
tree | 812216dece7810682c9d0bc4280bd10f39f1c4d7 | |
parent | 174ce949d707476e9f7e4a215b69e2c3a42569f4 (diff) | |
download | ffmpeg-1a577c59d093db9645fdeb2bd7a113c0e0432185.tar.gz |
libavcodec/libmp3lame: Don't free user-provided AVPacket
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit 7e6941e185649409f44fb5aa31207bd7b00d23cd)
-rw-r--r-- | libavcodec/libmp3lame.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c index 5e26743f29..79b2b9de06 100644 --- a/libavcodec/libmp3lame.c +++ b/libavcodec/libmp3lame.c @@ -279,7 +279,6 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, if ((discard_padding < avctx->frame_size) != (avpkt->duration > 0)) { av_log(avctx, AV_LOG_ERROR, "discard padding overflow\n"); av_packet_unref(avpkt); - av_free(avpkt); return AVERROR(EINVAL); } if ((!s->delay_sent && avctx->initial_padding > 0) || discard_padding > 0) { @@ -288,7 +287,6 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, 10); if(!side_data) { av_packet_unref(avpkt); - av_free(avpkt); return AVERROR(ENOMEM); } if (!s->delay_sent) { |