Unified · Split
| @@ -306,6 +306,15 @@ static int nvdec_hevc_frame_params(AVCodecContext *avctx, · 305 unmodified lines | ||
| 306 | 306 | static int nvdec_hevc_decode_init(AVCodecContext *avctx) { |
| 307 | 307 | NVDECContext *ctx = avctx->internal->hwaccel_priv_data; |
| 308 | 308 | ctx->supports_444 = 1; |
| 309 | + | |
| 310 | + if (avctx->profile != AV_PROFILE_HEVC_MAIN && | |
| 311 | + avctx->profile != AV_PROFILE_HEVC_MAIN_10 && | |
| 312 | + avctx->profile != AV_PROFILE_HEVC_MAIN_STILL_PICTURE && | |
| 313 | + avctx->profile != AV_PROFILE_HEVC_REXT) { | |
| 314 | + av_log(avctx, AV_LOG_ERROR, "Unsupported HEVC profile: %d\n", avctx->profile); | |
| 315 | + return AVERROR(ENOTSUP); | |
| 316 | + } | |
| 317 | + | |
| 309 | 318 | return ff_nvdec_decode_init(avctx); |
| 310 | 319 | } |
| 311 | 320 | |