Commit ac9b056d authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

Do not fail in get_buffer_internal() if pix_fmt planes == 0.

Fixes VDPAU decoding, reported by Ilja Sekler
parent 21a5f5ea
......@@ -758,6 +758,8 @@ do { \
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
planes = av_pix_fmt_count_planes(frame->format);
if (!planes)
planes = 1;
if (!desc || planes <= 0) {
ret = AVERROR(EINVAL);
goto fail;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment