X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fopusenc.c;h=3c08ebcf69584c68873d08181d1839f00b5a1f92;hb=24424a6516f8adc4c73a2fe00fa106b0e49abafd;hp=578785f4b417b563ced9b9522abcea4fefaa3afb;hpb=762c2b5dcd99a08452299cd1f83070f88115f1f3;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 */ }