History

avcodec/nvdec_hevc: fail to initialize on unsupported profiles

Timo Rothenpieler committed 3 years ago

Commit 68f9dfa1 parent 2e33f5c1 file · +9 −0Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/nvdec_hevc.c+9−0
@@ -306,6 +306,15 @@ static int nvdec_hevc_frame_params(AVCodecContext *avctx, · 305 unmodified lines
306306 static int nvdec_hevc_decode_init(AVCodecContext *avctx) {
307307 NVDECContext *ctx = avctx->internal->hwaccel_priv_data;
308308 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+
309318 return ff_nvdec_decode_init(avctx);
310319 }
311320

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t