提交 7e6941e1 编写于 作者: A Andreas Rheinhardt

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

Signed-off-by: NAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
上级 b803993b
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册