diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-03-22 01:03:07 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-03-22 01:03:07 +0100 |
commit | ac9b056ddbefecf3e68e89af45d9c8e5172a5ff8 (patch) | |
tree | 0b95eec17681799016130b901fc1a25697302fa7 | |
parent | 21a5f5ea5d08396d336663e34e5c755d7ae8dba5 (diff) | |
download | ffmpeg-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.c | 2 |
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; |