History

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

Andreas Rheinhardt committed 6 years ago

Commit 7e6941e1 parent b8039931 file · +0 −2Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/libmp3lame.c+0−2
@@ -279,7 +279,6 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 278 unmodified lines
279 if ((discard_padding < avctx->frame_size) != (avpkt->duration > 0)) {279 if ((discard_padding < avctx->frame_size) != (avpkt->duration > 0)) {
280 av_log(avctx, AV_LOG_ERROR, "discard padding overflow\n");280 av_log(avctx, AV_LOG_ERROR, "discard padding overflow\n");
281 av_packet_unref(avpkt);281 av_packet_unref(avpkt);
282 av_free(avpkt);
283 return AVERROR(EINVAL);282 return AVERROR(EINVAL);
284 }283 }
285 if ((!s->delay_sent && avctx->initial_padding > 0) || discard_padding > 0) {284 if ((!s->delay_sent && avctx->initial_padding > 0) || discard_padding > 0) {
@@ -288,7 +287,6 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, · 2 unmodified lines
288 10);287 10);
289 if(!side_data) {288 if(!side_data) {
290 av_packet_unref(avpkt);289 av_packet_unref(avpkt);
291 av_free(avpkt);
292 return AVERROR(ENOMEM);290 return AVERROR(ENOMEM);
293 }291 }
294 if (!s->delay_sent) {292 if (!s->delay_sent) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t