aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-06-17 19:02:15 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-19 18:40:49 +0200
commit250cf2d4dae0baf14ecdd6744c9555d24a6668ff (patch)
tree7c2175fb0f53b3659d10f1728ca553679ba6e099 /libavcodec
parent93d076b4fde12f11c67dcea86a27cc9770450fd4 (diff)
downloadffmpeg-250cf2d4dae0baf14ecdd6744c9555d24a6668ff.tar.gz
vp9: don't retain NULL as segmentation_map
This fixes segmentation faults, which were introduced in commit 4ba8f327. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> (cherry picked from commit d216b9debd9843d31732ebb7344a85b3cd96b7cc) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vp9.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index d5147e5b04..b9d207a79c 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -3988,7 +3988,8 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
int size = pkt->size;
VP9Context *s = ctx->priv_data;
int res, tile_row, tile_col, i, ref, row, col;
- int retain_segmap_ref = s->segmentation.enabled && !s->segmentation.update_map;
+ int retain_segmap_ref = s->segmentation.enabled && !s->segmentation.update_map
+ && s->frames[REF_FRAME_SEGMAP].segmentation_map;
ptrdiff_t yoff, uvoff, ls_y, ls_uv;
AVFrame *f;
int bytesperpixel;