[FFmpeg-cvslog] vp9: don't retain NULL as segmentation_map

Andreas Cadhalpun git at videolan.org
Fri Jun 19 00:13:40 CEST 2015


ffmpeg | branch: master | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Wed Jun 17 19:02:15 2015 +0200| [d216b9debd9843d31732ebb7344a85b3cd96b7cc] | committer: Andreas Cadhalpun

vp9: don't retain NULL as segmentation_map

This fixes segmentation faults, which were introduced in commit
4ba8f327.

Reviewed-by: Ronald S. Bultje <rsbultje at gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d216b9debd9843d31732ebb7344a85b3cd96b7cc
---

 libavcodec/vp9.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 4e2ed53..9d9326c 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;



More information about the ffmpeg-cvslog mailing list