Commit 12c4d00c authored by Zhong Li's avatar Zhong Li Committed by Timo Rothenpieler

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 9cb150c9

Should also fix ticket #8442.
Signed-off-by: 's avatarZhong Li <zhong.li@intel.com>
Signed-off-by: 's avatarTimo Rothenpieler <timo@rothenpieler.org>
parent d4996a60
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment