aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-27 12:44:31 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-27 12:44:31 +0200
commit6701c92fa4269872856c70c3170a9b3291b46247 (patch)
tree34a5e6a0712cbd23d861d027a72bba5268dc19b7
parentf174bfea86b38c0deaeb8d57166e6908bef9d69a (diff)
downloadffmpeg-6701c92fa4269872856c70c3170a9b3291b46247.tar.gz
avcodec/libopusenc: Fix infinite loop on flushing after 0 input
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-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);