summaryrefslogtreecommitdiff
path: root/libavcodec
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:25:08 +0200
commit7e6941e185649409f44fb5aa31207bd7b00d23cd (patch)
tree087da809406c54eb8ec2a47dfdfe6ec0441863e6 /libavcodec
parentb803993b6d99423c8c1e01e7e206e3916a98d5d5 (diff)
libavcodec/libmp3lame: Don't free user-provided AVPacket
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libmp3lame.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index ecdd2e334c..2beb28e569 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) {