diff options
author | Dave Robillard <dave@drobilla.net> | 2009-08-12 01:09:07 -0400 |
---|---|---|
committer | Dave Robillard <dave@drobilla.net> | 2009-08-12 01:09:07 -0400 |
commit | e46ff7bda0f7996b456476dccb4a822688a690fb (patch) | |
tree | 72f36b99c236a9a042c82702f99351456762de78 /sys/directdraw | |
parent | dd5afbf0c6557ad89994cbfd91e4117e8503b81a (diff) | |
parent | 7c7b82e7141b83e987be2142e7334d21407529fe (diff) | |
download | gst-plugins-bad-e46ff7bda0f7996b456476dccb4a822688a690fb.tar.gz gst-plugins-bad-e46ff7bda0f7996b456476dccb4a822688a690fb.tar.bz2 gst-plugins-bad-e46ff7bda0f7996b456476dccb4a822688a690fb.zip |
Merge branch 'master' of git://anongit.freedesktop.org/gstreamer/gst-plugins-bad into fdo
Diffstat (limited to 'sys/directdraw')
-rw-r--r-- | sys/directdraw/gstdirectdrawsink.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/directdraw/gstdirectdrawsink.c b/sys/directdraw/gstdirectdrawsink.c index 538227de..bb0332f8 100644 --- a/sys/directdraw/gstdirectdrawsink.c +++ b/sys/directdraw/gstdirectdrawsink.c @@ -961,10 +961,12 @@ gst_directdraw_sink_show_frame (GstBaseSink * bsink, GstBuffer * buf) /* Write each line respecting the destination surface pitch */ data = surf_desc.lpSurface; - src_pitch = GST_BUFFER_SIZE (buf) / ddrawsink->video_height; - for (line = 0; line < surf_desc.dwHeight; line++) { - memcpy (data, GST_BUFFER_DATA (buf) + (line * src_pitch), src_pitch); - data += surf_desc.lPitch; + if (ddrawsink->video_height) { + src_pitch = GST_BUFFER_SIZE (buf) / ddrawsink->video_height; + for (line = 0; line < surf_desc.dwHeight; line++) { + memcpy (data, GST_BUFFER_DATA (buf) + (line * src_pitch), src_pitch); + data += surf_desc.lPitch; + } } /* Unlock the surface */ |