diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 984014f1b1..fcb84ef0ac 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec/mediacodecenc.c @@ -533,7 +533,7 @@ static int mediacodec_encode(AVCodecContext *avctx, AVPacket *pkt) return 0; } - if (ret != AVERROR(EAGAIN)) + if (ret < 0 && ret != AVERROR(EAGAIN)) return ret; if (!s->frame->buf[0]) {