From 12c4d00c10cb73f1976c8de5b23b1405803bd454 Mon Sep 17 00:00:00 2001 From: Zhong Li Date: Mon, 23 Oct 2017 15:43:30 +0800 Subject: [PATCH] avcodec/mpeg12dec: always submit the first field to hwaccel Though this patch to fix ticket #6668, I belive it is unnecessary to set SLICE_FLAG_ALLOW_FIELD flag to other hwaccels(dxva, vdpau, etc). Please also refer the orginal comment of 9cb150c9ab520eba5636bbcf925db6a70e67f3e5 Should also fix ticket #8442. Signed-off-by: Zhong Li Signed-off-by: Timo Rothenpieler --- libavcodec/mpeg12dec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 775579f9f0..17f9495a1d 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -1669,8 +1669,7 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) return AVERROR_INVALIDDATA; } - if (s->avctx->hwaccel && - (s->avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD)) { + if (s->avctx->hwaccel) { if ((ret = s->avctx->hwaccel->end_frame(s->avctx)) < 0) { av_log(avctx, AV_LOG_ERROR, "hardware accelerator failed to decode first field\n");