Originally committed as revision 12193 to svn://svn.ffmpeg.org/ffmpeg/trunk
Loren Merritt authored on 2008/02/25 14:46:53... | ... |
@@ -262,8 +262,8 @@ static void png_handle_row(PNGDecContext *s) |
262 | 262 |
if (s->color_type == PNG_COLOR_TYPE_RGB_ALPHA) { |
263 | 263 |
png_filter_row(&s->dsp, s->tmp_row, s->crow_buf[0], s->crow_buf + 1, |
264 | 264 |
s->last_row, s->row_size, s->bpp); |
265 |
- memcpy(s->last_row, s->tmp_row, s->row_size); |
|
266 | 265 |
convert_to_rgb32(ptr, s->tmp_row, s->width); |
266 |
+ FFSWAP(uint8_t*, s->last_row, s->tmp_row); |
|
267 | 267 |
} else { |
268 | 268 |
/* in normal case, we avoid one copy */ |
269 | 269 |
if (s->y == 0) |
... | ... |
@@ -289,7 +289,7 @@ static void png_handle_row(PNGDecContext *s) |
289 | 289 |
break; |
290 | 290 |
png_filter_row(&s->dsp, s->tmp_row, s->crow_buf[0], s->crow_buf + 1, |
291 | 291 |
s->last_row, s->pass_row_size, s->bpp); |
292 |
- memcpy(s->last_row, s->tmp_row, s->pass_row_size); |
|
292 |
+ FFSWAP(uint8_t*, s->last_row, s->tmp_row); |
|
293 | 293 |
got_line = 1; |
294 | 294 |
} |
295 | 295 |
if ((png_pass_dsp_ymask[s->pass] << (s->y & 7)) & 0x80) { |