X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fopusenc.c;h=3c08ebcf69584c68873d08181d1839f00b5a1f92;hb=634529c40d62e02bacea3a7f91d4226a9e4b3cbc;hp=578785f4b417b563ced9b9522abcea4fefaa3afb;hpb=7167ac33a8f2c7d063384c267f984f23d2b73854;p=ffmpeg diff --git a/libavcodec/opusenc.c b/libavcodec/opusenc.c index 578785f4b41..3c08ebcf695 100644 --- a/libavcodec/opusenc.c +++ b/libavcodec/opusenc.c @@ -543,7 +543,7 @@ static int opus_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, ff_bufqueue_add(avctx, &s->bufqueue, av_frame_clone(frame)); } else { ff_opus_psy_signal_eof(&s->psyctx); - if (!s->afq.remaining_samples) + if (!s->afq.remaining_samples || !avctx->frame_number) return 0; /* We've been flushed and there's nothing left to encode */ }