Browse Source

libavcodec/libmp3lame: Don't free user-provided AVPacket

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit 7e6941e185)
tags/n4.2.4
Andreas Rheinhardt 5 years ago
parent
commit
ef76e5acaa
1 changed files with 0 additions and 2 deletions
  1. +0
    -2
      libavcodec/libmp3lame.c

+ 0
- 2
libavcodec/libmp3lame.c View File

@@ -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) {


Loading…
Cancel
Save