Mercurial > libavcodec.hg
comparison imgconvert.c @ 2785:c8d53188048d libavcodec
segfault fix
author | michael |
---|---|
date | Mon, 11 Jul 2005 00:43:21 +0000 |
parents | 18b8b2dcc037 |
children | ef2149182f1c |
comparison
equal
deleted
inserted
replaced
2784:cdf74a048614 | 2785:c8d53188048d |
---|---|
574 | 574 |
575 static void img_copy_plane(uint8_t *dst, int dst_wrap, | 575 static void img_copy_plane(uint8_t *dst, int dst_wrap, |
576 const uint8_t *src, int src_wrap, | 576 const uint8_t *src, int src_wrap, |
577 int width, int height) | 577 int width, int height) |
578 { | 578 { |
579 if((!dst) || (!src)) | |
580 return; | |
579 for(;height > 0; height--) { | 581 for(;height > 0; height--) { |
580 memcpy(dst, src, width); | 582 memcpy(dst, src, width); |
581 dst += dst_wrap; | 583 dst += dst_wrap; |
582 src += src_wrap; | 584 src += src_wrap; |
583 } | 585 } |