[FFmpeg-cvslog] Do not fail in get_buffer_internal() if pix_fmt planes == 0.

Carl Eugen Hoyos git at videolan.org
Fri Mar 22 01:09:40 CET 2013


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Fri Mar 22 01:03:07 2013 +0100| [ac9b056ddbefecf3e68e89af45d9c8e5172a5ff8] | committer: Carl Eugen Hoyos

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

Fixes VDPAU decoding, reported by Ilja Sekler

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac9b056ddbefecf3e68e89af45d9c8e5172a5ff8
---

 libavcodec/utils.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index c15b772..70c6129 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;



More information about the ffmpeg-cvslog mailing list