Commit 81503f23 authored by kostya's avatar kostya

Use frame linesize in Interplay Video block copying function

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20929 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 64f1d3b9
...@@ -87,7 +87,7 @@ typedef struct IpvideoContext { ...@@ -87,7 +87,7 @@ typedef struct IpvideoContext {
static int copy_from(IpvideoContext *s, AVFrame *src, int delta_x, int delta_y) 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 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) { if (motion_offset < 0) {
av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset < 0 (%d)\n", motion_offset); av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset < 0 (%d)\n", motion_offset);
return -1; return -1;
...@@ -96,7 +96,7 @@ static int copy_from(IpvideoContext *s, AVFrame *src, int delta_x, int delta_y) ...@@ -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); motion_offset, s->upper_motion_limit_offset);
return -1; 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; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment