Skip to content

Commit

Permalink
vp9: don't retain NULL as segmentation_map
Browse files Browse the repository at this point in the history
This fixes segmentation faults, which were introduced in commit
4ba8f32.

Reviewed-by: Ronald S. Bultje <[email protected]>
Signed-off-by: Andreas Cadhalpun <[email protected]>
  • Loading branch information
Andreas Cadhalpun authored and Andreas Cadhalpun committed Jun 18, 2015
1 parent f6c3f1e commit d216b9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libavcodec/vp9.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d216b9d

Please sign in to comment.