aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-03-22 01:03:07 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-03-22 01:03:07 +0100
commitac9b056ddbefecf3e68e89af45d9c8e5172a5ff8 (patch)
tree0b95eec17681799016130b901fc1a25697302fa7
parent21a5f5ea5d08396d336663e34e5c755d7ae8dba5 (diff)
downloadffmpeg-ac9b056ddbefecf3e68e89af45d9c8e5172a5ff8.tar.gz
Do not fail in get_buffer_internal() if pix_fmt planes == 0.
Fixes VDPAU decoding, reported by Ilja Sekler
-rw-r--r--libavcodec/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index c15b7726cb..70c6129f75 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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;