On Tue, Jan 08, 2013 at 03:37:13PM +0100, Anton Khirnov wrote: > --- > libavcodec/interplayvideo.c | 137 > +++++++++++++++++++++---------------------- > 1 file changed, 68 insertions(+), 69 deletions(-) > > diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c > index 76e7d0f..57035fd 100644 > --- a/libavcodec/interplayvideo.c > +++ b/libavcodec/interplayvideo.c > @@ -51,9 +51,8 @@ typedef struct IpvideoContext { > > AVCodecContext *avctx; > DSPContext dsp; > - AVFrame second_last_frame; > - AVFrame last_frame; > - AVFrame current_frame; > + AVFrame *second_last_frame; > + AVFrame *last_frame; > const unsigned char *decoding_map; > int decoding_map_size; > > @@ -67,10 +66,10 @@ typedef struct IpvideoContext { > uint32_t pal[256]; > } IpvideoContext; > > -static int copy_from(IpvideoContext *s, AVFrame *src, int delta_x, int > delta_y) > +static int copy_from(IpvideoContext *s, AVFrame *src, AVFrame *dst, int > delta_x, int delta_y) > { > - int current_offset = s->pixel_ptr - s->current_frame.data[0]; > - int motion_offset = current_offset + delta_y * > s->current_frame.linesize[0] > + int current_offset = s->pixel_ptr - dst->data[0]; > + int motion_offset = current_offset + delta_y * dst->linesize[0] > + delta_x * (1 + s->is_16bpp);
Diego looks at you disapprovingly. > if (motion_offset < 0) { > av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset < 0 > (%d)\n", motion_offset); in general patch looks like it might be OK after all _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel