Commit b7040e67 authored by John Högberg's avatar John Högberg Committed by Anton Khirnov

h264: fix AVDISCARD_NONKEY for some interlaced content

When skip_frame is set to _NONKEY the decoder skips everything except intra
slices, which breaks frames that consist of an intra field together with any
other field type; half the frame becomes garbage. This patch fixes the issue by
letting non-intra slices through if they're part of a keyframe.
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent b5c1c162
......@@ -1507,7 +1507,7 @@ again:
(avctx->skip_frame < AVDISCARD_BIDIR ||
sl->slice_type_nos != AV_PICTURE_TYPE_B) &&
(avctx->skip_frame < AVDISCARD_NONKEY ||
sl->slice_type_nos == AV_PICTURE_TYPE_I) &&
h->cur_pic_ptr->f->key_frame) &&
avctx->skip_frame < AVDISCARD_ALL) {
if (avctx->hwaccel) {
ret = avctx->hwaccel->decode_slice(avctx,
......
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