summaryrefslogtreecommitdiffstats
path: root/gst/avi
diff options
context:
space:
mode:
authorGergely Nagy <algernon@bonhunter.rulez.org>2005-02-17 19:21:42 +0000
committerTim-Philipp Müller <tim@centricular.net>2005-02-17 19:21:42 +0000
commitae541a6e164546750c7112d438c96cfc2096d76b (patch)
tree23c2d5f88ac320fe8878b08fa5518f9ab4483fe9 /gst/avi
parent2ec02a4399885cf1946f9ac02cf36ee227fd2f17 (diff)
gst/avi/gstavidemux.c: Declare variables at beginning of block and make gcc-2.95 happy
Original commit message from CVS: * gst/avi/gstavidemux.c: (gst_avi_demux_invert): Declare variables at beginning of block and make gcc-2.95 happy (fixes # 167482, patch by Gergely Nagy). * gst/tcp/gsttcpclientsrc.c: * gst/tcp/gsttcpclientsrc.h: Move some includes into the header, so that struct sockaddr_in is defined when it should be defined on FreeBSD as well (fixes #167483). * gst/tcp/gsttcpserversrc.c: (gst_tcpserversrc_init_receive): Don't pass uninitialised values to setsockopt() here either.
Diffstat (limited to 'gst/avi')
-rw-r--r--gst/avi/gstavidemux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c
index 2fdd16bd..99c14cc8 100644
--- a/gst/avi/gstavidemux.c
+++ b/gst/avi/gstavidemux.c
@@ -2005,10 +2005,11 @@ swap_line (guint8 * d1, guint8 * d2, guint8 * tmp, gint bytes)
static GstBuffer *
gst_avi_demux_invert (avi_stream_context * stream, GstBuffer * buf)
{
- buf = gst_buffer_copy_on_write (buf);
gint y, h = stream->height, w = stream->width;
guint8 *tmp = g_malloc (w);
+ buf = gst_buffer_copy_on_write (buf);
+
for (y = 0; y < h / 2; y++) {
swap_line (GST_BUFFER_DATA (buf) + w * y,
GST_BUFFER_DATA (buf) + w * (h - 1 - y), tmp, w);