Commit bdf7093b authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/utils: Check all data[] pointers in video_get_buffer() not just the first

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1e7a37f0
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment