Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-27 13:44:31 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-27 13:44:31 +0300
commit6701c92fa4269872856c70c3170a9b3291b46247 (patch)
tree34a5e6a0712cbd23d861d027a72bba5268dc19b7 /libavcodec/libopusenc.c
parentf174bfea86b38c0deaeb8d57166e6908bef9d69a (diff)
avcodec/libopusenc: Fix infinite loop on flushing after 0 input
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/libopusenc.c')
-rw-r--r--libavcodec/libopusenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c
index 48dbebcfc4..a170b711c6 100644
--- a/libavcodec/libopusenc.c
+++ b/libavcodec/libopusenc.c
@@ -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);