From 9df508faaa3ec052fb7795f02f80854bf1c54bc9 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 27 Jul 2005 13:24:02 +0000 Subject: [PATCH] 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. --- ChangeLog | 5 +++++ gst/videoscale/gstvideoscale.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a3c8f1b797..0527eaf612 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-07-27 Ronald S. Bultje + + * gst/videoscale/gstvideoscale.c: (gst_videoscale_prepare_images): + Fix segfault for I420/YV12. + 2005-07-25 Ronald S. Bultje * ext/vorbis/vorbisdec.c: (vorbis_handle_comment_packet): diff --git a/gst/videoscale/gstvideoscale.c b/gst/videoscale/gstvideoscale.c index 28130a1342..5a77cb0ff1 100644 --- a/gst/videoscale/gstvideoscale.c +++ b/gst/videoscale/gstvideoscale.c @@ -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: