summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-02-26 12:59:07 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-02-27 13:11:52 +0100
commitbdf7093bd0cb78d39df8a32cfdc9188d7a960278 (patch)
tree52faeaa35d271e1fa100ff2a25574e728ab2eb0a /libavcodec/utils.c
parent1e7a37f0a07f3f2077352d43602e36024f6c9f2e (diff)
avcodec/utils: Check all data[] pointers in video_get_buffer() not just the first
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 0da82adaf9..b5de8a10b1 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -656,8 +656,8 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pic->format);
int i;
- if (pic->data[0]) {
- av_log(s, AV_LOG_ERROR, "pic->data[0]!=NULL in avcodec_default_get_buffer\n");
+ if (pic->data[0] || pic->data[1] || pic->data[2] || pic->data[3]) {
+ av_log(s, AV_LOG_ERROR, "pic->data[*]!=NULL in avcodec_default_get_buffer\n");
return -1;
}