aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-23 12:11:30 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-23 20:49:41 +0200
commit10b280a902a769aaf2292f486d83f2268f2fedda (patch)
tree05fe0edddff2875d76d77fa867b19fa29126a4cb
parentc70ecbdef0174c3c800bb1d8bb3ed5dbe4fa0670 (diff)
downloadffmpeg-10b280a902a769aaf2292f486d83f2268f2fedda.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.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index e55aa8537a..662fc213f2 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -275,7 +275,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) {
@@ -284,7 +283,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) {