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