Skip to content
Snippets Groups Projects
Commit ee88dcb2 authored by Philip Langdale's avatar Philip Langdale Committed by Timo Rothenpieler
Browse files

avcodec/cuvid: Check for non 420 chroma formats - they aren't supported


Despite the video parser seeming to correctly handle 422 and 444
chroma formats, the video decoder fails miserably to actually
decode frames - even though no errors are ever returned; you just
get frames showing unintialized garbage.

Signed-off-by: default avatarPhilip Langdale <philipl@overt.org>
Signed-off-by: default avatarTimo Rothenpieler <timo@rothenpieler.org>
parent 8a066697
No related branches found
No related tags found
No related merge requests found
......@@ -137,6 +137,12 @@ static int CUDAAPI cuvid_handle_video_sequence(void *opaque, CUVIDEOFORMAT* form
return 0;
}
if (format->chroma_format != cudaVideoChromaFormat_420) {
av_log(avctx, AV_LOG_ERROR, "Chroma formats other than 420 are not supported\n");
ctx->internal_error = AVERROR(EINVAL);
return 0;
}
avctx->coded_width = format->coded_width;
avctx->coded_height = format->coded_height;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment