On 05.10.2016 21:37, Jon Toohill wrote: > --- > libavcodec/libmp3lame.c | 26 +++++++++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c > index 5642264..b3ba0d8 100644 > --- a/libavcodec/libmp3lame.c > +++ b/libavcodec/libmp3lame.c [...] > @@ -269,6 +270,29 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, > AVPacket *avpkt, > ff_af_queue_remove(&s->afq, avctx->frame_size, &avpkt->pts, > &avpkt->duration); > > + discard_padding = avctx->frame_size - avpkt->duration; > + // Check if subtraction resulted in an overflow > + if ((discard_padding < avctx->frame_size) != (avpkt->duration > 0)) { > + av_packet_unref(avpkt); > + av_free(avpkt);
It would be nice to have an av_log here reporting the problem. Otherwise patch LGTM. Best regards, Andreas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel