[FFmpeg-cvslog] r26279 - trunk/libavcodec/eacmv.c

pross subversion
Sun Jan 9 09:28:41 CET 2011


Author: pross
Date: Sun Jan  9 09:28:40 2011
New Revision: 26279

Log:
eacmv: ensure second-last frame is allocated before referencing it
Fixes issue2513
Original patch by Daniel Kang, daniel.d.kang at gmail

Modified:
   trunk/libavcodec/eacmv.c

Modified: trunk/libavcodec/eacmv.c
==============================================================================
--- trunk/libavcodec/eacmv.c	Sun Jan  9 03:44:54 2011	(r26278)
+++ trunk/libavcodec/eacmv.c	Sun Jan  9 09:28:40 2011	(r26279)
@@ -97,6 +97,7 @@ static void cmv_decode_inter(CmvContext 
             }else if(raw<buf_end) {  /* inter using second-last frame as reference */
                 int xoffset = (*raw & 0xF) - 7;
                 int yoffset = ((*raw >> 4)) - 7;
+                if (s->last2_frame.data[0])
                 cmv_motcomp(s->frame.data[0], s->frame.linesize[0],
                             s->last2_frame.data[0], s->last2_frame.linesize[0],
                             x*4, y*4, xoffset, yoffset, s->avctx->width, s->avctx->height);



More information about the ffmpeg-cvslog mailing list