summaryrefslogtreecommitdiff
path: root/libavcodec/interplayvideo.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2009-12-27 08:38:07 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2009-12-27 08:38:07 +0000
commit80fec3ffd037c6984f67a0537c625d7a5fff4922 (patch)
treea1706bc206260e855aa81d94351a19d506fd717b /libavcodec/interplayvideo.c
parent80ca19f766aea8f4724aac1b3faa772d25163c8a (diff)
Use frame linesize in Interplay Video block copying function
Originally committed as revision 20929 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/interplayvideo.c')
-rw-r--r--libavcodec/interplayvideo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index 967bb51955..d1dbc1a89d 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -87,7 +87,7 @@ typedef struct IpvideoContext {
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 @@ static int copy_from(IpvideoContext *s, AVFrame *src, int delta_x, int delta_y)
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;
}