History

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.

Philip Langdale committed 10 years ago

Commit ee88dcb1 parent 8a066691 file · +6 −0Browse files

Unified · Split

libavcodec/cuvid.c+6−0
@@ -137,6 +137,12 @@ static int CUDAAPI cuvid_handle_video_sequence(void *opaque, CUVIDEOFORMAT* form · 136 unmodified lines
137 return 0;137 return 0;
138 }138 }
139 139
140 if (format->chroma_format != cudaVideoChromaFormat_420) {
141 av_log(avctx, AV_LOG_ERROR, "Chroma formats other than 420 are not supported\n");
142 ctx->internal_error = AVERROR(EINVAL);
143 return 0;
144 }
145
140 avctx->coded_width = format->coded_width;146 avctx->coded_width = format->coded_width;
141 avctx->coded_height = format->coded_height;147 avctx->coded_height = format->coded_height;
142 148

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