[FFmpeg-cvslog] avcodec/nvdec_hevc: fail to initialize on unsupported profiles
ffmpeg | branch: release/6.0 | Timo Rothenpieler | Tue Oct 10 17:34:47 2023 +0200| [c5039e158d20e85d4d8a2dee3160533d627b839a] | committer: Timo Rothenpieler avcodec/nvdec_hevc: fail to initialize on unsupported profiles > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c5039e158d20e85d4d8a2dee3160533d627b839a --- libavcodec/nvdec_hevc.c | 9 + 1 file changed, 9 insertions(+) diff --git a/libavcodec/nvdec_hevc.c b/libavcodec/nvdec_hevc.c index cd549d2ef6..1ab1c39d75 100644 --- a/libavcodec/nvdec_hevc.c +++ b/libavcodec/nvdec_hevc.c @@ -305,6 +305,15 @@ static int nvdec_hevc_frame_params(AVCodecContext *avctx, static int nvdec_hevc_decode_init(AVCodecContext *avctx) { NVDECContext *ctx = avctx->internal->hwaccel_priv_data; ctx->supports_444 = 1; + +if (avctx->profile != FF_PROFILE_HEVC_MAIN && +avctx->profile != FF_PROFILE_HEVC_MAIN_10 && +avctx->profile != FF_PROFILE_HEVC_MAIN_STILL_PICTURE && +avctx->profile != FF_PROFILE_HEVC_REXT) { +av_log(avctx, AV_LOG_ERROR, "Unsupported HEVC profile: %d\n", avctx->profile); +return AVERROR(ENOTSUP); +} + return ff_nvdec_decode_init(avctx); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/nvdec_hevc: fail to initialize on unsupported profiles
ffmpeg | branch: master | Timo Rothenpieler | Tue Oct 10 17:34:47 2023 +0200| [68f9dfa5cc2e876207ca38affbbdaa0d6714d654] | committer: Timo Rothenpieler avcodec/nvdec_hevc: fail to initialize on unsupported profiles > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=68f9dfa5cc2e876207ca38affbbdaa0d6714d654 --- libavcodec/nvdec_hevc.c | 9 + 1 file changed, 9 insertions(+) diff --git a/libavcodec/nvdec_hevc.c b/libavcodec/nvdec_hevc.c index 91fb9f5384..b83d5edcf9 100644 --- a/libavcodec/nvdec_hevc.c +++ b/libavcodec/nvdec_hevc.c @@ -306,6 +306,15 @@ static int nvdec_hevc_frame_params(AVCodecContext *avctx, static int nvdec_hevc_decode_init(AVCodecContext *avctx) { NVDECContext *ctx = avctx->internal->hwaccel_priv_data; ctx->supports_444 = 1; + +if (avctx->profile != AV_PROFILE_HEVC_MAIN && +avctx->profile != AV_PROFILE_HEVC_MAIN_10 && +avctx->profile != AV_PROFILE_HEVC_MAIN_STILL_PICTURE && +avctx->profile != AV_PROFILE_HEVC_REXT) { +av_log(avctx, AV_LOG_ERROR, "Unsupported HEVC profile: %d\n", avctx->profile); +return AVERROR(ENOTSUP); +} + return ff_nvdec_decode_init(avctx); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".