mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/libopusenc: Fix infinite loop on flushing after 0 input
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 6701c92fa4269872856c70c3170a9b3291b46247) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
679df05683
commit
42fd94b514
@ -326,7 +326,7 @@ static int libopus_encode(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
} else
|
||||
audio = frame->data[0];
|
||||
} else {
|
||||
if (!opus->afq.remaining_samples)
|
||||
if (!opus->afq.remaining_samples || (!opus->afq.frame_alloc && !opus->afq.frame_count))
|
||||
return 0;
|
||||
audio = opus->samples;
|
||||
memset(audio, 0, opus->opts.packet_size * sample_size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user