mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
avcodec/libmp3lame: do not attempt to flush lame if no data was input
this prevents the creation of a packet even though no single sample has ever been input, which some confusion in the timestamp generation Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
6552e23d56
commit
ebbc33a42d
@ -208,6 +208,8 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
default:
|
||||
return AVERROR_BUG;
|
||||
}
|
||||
} else if (!s->afq.frame_alloc) {
|
||||
lame_result = 0;
|
||||
} else {
|
||||
lame_result = lame_encode_flush(s->gfp, s->buffer + s->buffer_index,
|
||||
s->buffer_size - s->buffer_index);
|
||||
|
Loading…
x
Reference in New Issue
Block a user