]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/mpeg12dec: always submit the first field to hwaccel
authorZhong Li <zhong.li@intel.com>
Mon, 23 Oct 2017 07:43:30 +0000 (15:43 +0800)
committerTimo Rothenpieler <timo@rothenpieler.org>
Thu, 2 Jan 2020 12:29:46 +0000 (13:29 +0100)
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 <zhong.li@intel.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
libavcodec/mpeg12dec.c

index 775579f9f0b36febcc9873244006975a82ed494b..17f9495a1da455d97b82ad742e6277b862816d19 100644 (file)
@@ -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");