Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-06-17 20:02:15 +0300
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-06-19 01:07:43 +0300
commitd216b9debd9843d31732ebb7344a85b3cd96b7cc (patch)
treef17579928cf69a0485f6043bef905ad8926af91d
parentf6c3f1ed6048ebc55f652ed59f7af9acebbf57e5 (diff)
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>
-rw-r--r--libavcodec/vp9.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 4e2ed53745..9d9326c247 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;