# HG changeset patch # User kostya # Date 1261903087 0 # Node ID 5c36c4772cf8c8f0d6809d7f8efbd16d4437e1e1 # Parent b703476cd4df5b73b53394bcdb58cf490e41ec30 Use frame linesize in Interplay Video block copying function diff -r b703476cd4df -r 5c36c4772cf8 interplayvideo.c --- a/interplayvideo.c Sun Dec 27 08:31:39 2009 +0000 +++ b/interplayvideo.c Sun Dec 27 08:38:07 2009 +0000 @@ -87,7 +87,7 @@ static int copy_from(IpvideoContext *s, AVFrame *src, 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->stride + delta_x; + int motion_offset = current_offset + delta_y * s->current_frame.linesize[0] + delta_x; if (motion_offset < 0) { av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset < 0 (%d)\n", motion_offset); return -1; @@ -96,7 +96,7 @@ motion_offset, s->upper_motion_limit_offset); return -1; } - s->dsp.put_pixels_tab[1][0](s->pixel_ptr, src->data[0] + motion_offset, s->stride, 8); + s->dsp.put_pixels_tab[1][0](s->pixel_ptr, src->data[0] + motion_offset, s->current_frame.linesize[0], 8); return 0; }