Hi! Attached patch fixes ticket #7227 here, -skip_frame nokey shows no warnings on decoding with this change and still decodes less frames than -skip_frame nointra (which shows many warnings).
Please comment, Carl Eugen
From ea5cf5aab2a9360971f5291fce19e5daae833de0 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceffm...@gmail.com> Date: Thu, 24 May 2018 18:53:16 +0200 Subject: [PATCH] lavc/hevcdec: Treat clean random access nals as keyframes for -skip_frame. Fixes ticket #7227. --- libavcodec/hevcdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index c887762..dd7675a 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -2919,7 +2919,7 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) if ( (s->avctx->skip_frame >= AVDISCARD_BIDIR && s->sh.slice_type == HEVC_SLICE_B) || (s->avctx->skip_frame >= AVDISCARD_NONINTRA && s->sh.slice_type != HEVC_SLICE_I) || - (s->avctx->skip_frame >= AVDISCARD_NONKEY && !IS_IDR(s))) { + (s->avctx->skip_frame >= AVDISCARD_NONKEY && !IS_IDR(s) && s->nal_unit_type != HEVC_NAL_CRA_NUT)) { break; } -- 1.7.10.4
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel