summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/decode/vd_lavc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index b18e06deb0..8c5c7e8af5 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -1215,11 +1215,11 @@ static int receive_frame(struct mp_filter *vd, struct mp_frame *out_frame)
if (ret == AVERROR(EAGAIN) && ctx->num_requeue_packets)
return 0; // force retry, so send_queued_packet() gets called
- if (!ctx->num_delay_queue)
+ if (ctx->num_delay_queue <= ctx->max_delay_queue && ret != AVERROR_EOF)
return ret;
- if (ctx->num_delay_queue <= ctx->max_delay_queue && ret != AVERROR_EOF)
- return AVERROR(EAGAIN);
+ if (!ctx->num_delay_queue)
+ return ret;
struct mp_image *res = ctx->delay_queue[0];
MP_TARRAY_REMOVE_AT(ctx->delay_queue, ctx->num_delay_queue, 0);