gst/videoscale/gstvideoscale.c: Fix segfault for I420/YV12.

Original commit message from CVS:
* gst/videoscale/gstvideoscale.c: (gst_videoscale_prepare_images):
Fix segfault for I420/YV12.
This commit is contained in:
Ronald S. Bultje 2005-07-27 13:24:02 +00:00
parent d8f417fbb7
commit 9df508faaa
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2005-07-27 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/videoscale/gstvideoscale.c: (gst_videoscale_prepare_images):
Fix segfault for I420/YV12.
2005-07-25 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/vorbis/vorbisdec.c: (vorbis_handle_comment_packet):

View file

@ -447,14 +447,14 @@ gst_videoscale_prepare_images (GstVideoscale * videoscale, GstBuffer * in,
src_u->height = ROUND_UP_2 (src->height) / 2;
src_u->width = ROUND_UP_2 (src->width) / 2;
src_u->stride = ROUND_UP_4 (src->stride / 2);
memcpy (src_v, src_u, sizeof (src_v));
memcpy (src_v, src_u, sizeof (*src_v));
src_v->pixels = src_u->pixels + src_u->height * src_u->stride;
dest_u->pixels = dest->pixels + ROUND_UP_2 (dest->height) * dest->stride;
dest_u->height = ROUND_UP_2 (dest->height) / 2;
dest_u->width = ROUND_UP_2 (dest->width) / 2;
dest_u->stride = ROUND_UP_4 (dest->stride / 2);
memcpy (dest_v, dest_u, sizeof (dest_v));
memcpy (dest_v, dest_u, sizeof (*dest_v));
dest_v->pixels = dest_u->pixels + dest_u->height * dest_u->stride;
break;
default: