diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-02-29 06:20:22 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-02-29 06:27:38 +0100 |
commit | c2500635235d809e0c0ac526a7e13072ab7c8900 (patch) | |
tree | 623e25483adae3ba3992f50841babf2f190b8457 /libavcodec | |
parent | 8534881a389044ec51adabcf979616b4875ac072 (diff) | |
download | ffmpeg-c2500635235d809e0c0ac526a7e13072ab7c8900.tar.gz |
get_buffers: Check that pix_fmt is not NONE.
This is somewhat redundant as no decoder should call get_buffer() with such argument.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index a697facdaa..63f7fae88a 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -414,7 +414,7 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic) return -1; } - if(av_image_check_size(w, h, 0, s)) + if(av_image_check_size(w, h, 0, s) || s->pix_fmt<0) return -1; if (!avci->buffer) { |