summaryrefslogtreecommitdiffstats
path: root/video/decode/vd_lavc.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/decode/vd_lavc.c')
-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 3d29a9c7d9..1ecd65af6b 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -612,6 +612,9 @@ static void decode(struct dec_video *vd, struct demux_packet *packet,
struct vd_lavc_params *lavc_param = ctx->opts->vd_lavc_params;
AVPacket pkt;
+ if (ctx->hwdec_request_reinit)
+ avcodec_flush_buffers(avctx);
+
if (flags) {
// hr-seek framedrop vs. normal framedrop
avctx->skip_frame = flags == 2 ? AVDISCARD_NONREF : lavc_param->framedrop;
@@ -632,9 +635,6 @@ static void decode(struct dec_video *vd, struct demux_packet *packet,
return;
}
- if (ctx->hwdec_request_reinit)
- avcodec_flush_buffers(avctx);
-
// Skipped frame, or delayed output due to multithreaded decoding.
if (!got_picture)
return;