summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12dec.c
diff options
context:
space:
mode:
authorZhong Li <zhong.li@intel.com>2017-10-23 15:43:30 +0800
committerTimo Rothenpieler <timo@rothenpieler.org>2020-01-02 13:29:46 +0100
commit12c4d00c10cb73f1976c8de5b23b1405803bd454 (patch)
tree6d06d3a88881a739993676ae732f7e22912c2f9a /libavcodec/mpeg12dec.c
parentd4996a600ca0334235a4b66beae5b5c3474535c4 (diff)
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 <zhong.li@intel.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r--libavcodec/mpeg12dec.c3
1 files changed, 1 insertions, 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");