aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJohn Högberg <john.hogberg@ericsson.com>2015-07-24 15:30:38 +0200
committerAnton Khirnov <anton@khirnov.net>2015-07-27 18:11:00 +0200
commitb7040e67ec18259ca634a0e29d98469b3484a87c (patch)
treec0cb26e21c6fb98af4e18ec5b51cb60f73d22035 /libavcodec
parentb5c1c16247ab7d166c84eaf4564e49a1535fdaaf (diff)
downloadffmpeg-b7040e67ec18259ca634a0e29d98469b3484a87c.tar.gz
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: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index eb4edb9f9e..7c2b307787 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -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,