summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-08-16 23:05:27 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-16 23:05:27 +0200
commita95fdac4c6203037a4690a4f7960223c8daad73e (patch)
tree42a53792e690c1cdbbdad2a027714f0373752559 /libavcodec
parentb1d12509384b9285b85f5c183772d75a81e74009 (diff)
downloadffmpeg-streaming-a95fdac4c6203037a4690a4f7960223c8daad73e.zip
ffmpeg-streaming-a95fdac4c6203037a4690a4f7960223c8daad73e.tar.gz
avcodec/ffv1enc: do not offset null pointers
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ffv1enc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 0a72591..dc9c499 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -1007,8 +1007,8 @@ static int encode_slice(AVCodecContext *c, void *arg)
int ret;
RangeCoder c_bak = fs->c;
const uint8_t *planes[3] = {p->data[0] + ps*x + y*p->linesize[0],
- p->data[1] + ps*x + y*p->linesize[1],
- p->data[2] + ps*x + y*p->linesize[2]};
+ p->data[1] ? p->data[1] + ps*x + y*p->linesize[1] : NULL,
+ p->data[2] ? p->data[2] + ps*x + y*p->linesize[2] : NULL};
fs->slice_coding_mode = 0;
if (f->version > 3) {
OpenPOWER on IntegriCloud