diff mbox

[FFmpeg-devel,V4,1/2] mpeg2_hwaccel: always submit the first field to HW.

Message ID 20171023074331.1603-1-zhong.li@intel.com
State New
Headers show

Commit Message

Zhong Li Oct. 23, 2017, 7:43 a.m. UTC
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

Signed-off-by: Zhong Li <zhong.li@intel.com>
---
 libavcodec/mpeg12dec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 4e68be27f1..5dc4612c77 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1689,8 +1689,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");