summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-12-24 19:27:57 (GMT)
committerWim Taymans <wim@metal.(none)>2009-12-24 20:45:12 (GMT)
commit3c0f18d765d86df2a545c4152b944a80d35f1631 (patch)
treec0693282f615ce1f717ad39c31ab3d602fa017ca
parentac03ad782a9bc059089fd1a91eb00a9b1ba05186 (diff)
videomixer: some trivial cleanups
-rw-r--r--gst/videomixer/videomixer.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/gst/videomixer/videomixer.c b/gst/videomixer/videomixer.c
index f404c28..230f1a5 100644
--- a/gst/videomixer/videomixer.c
+++ b/gst/videomixer/videomixer.c
@@ -1380,21 +1380,16 @@ gst_videomixer_collected (GstCollectPads * pads, GstVideoMixer * mix)
/* Calculating out buffer size from input size */
gst_pad_set_caps (mix->srcpad, newcaps);
- outsize =
- gst_video_format_get_size (mix->fmt, mix->out_width, mix->out_height);
- ret =
- gst_pad_alloc_buffer_and_set_caps (mix->srcpad, GST_BUFFER_OFFSET_NONE,
- outsize, newcaps, &outbuf);
gst_caps_unref (newcaps);
- } else { /* Otherwise we just allocate a buffer from current caps */
- /* Calculating out buffer size from input size */
- outsize =
- gst_video_format_get_size (mix->fmt, mix->out_width, mix->out_height);
- ret =
- gst_pad_alloc_buffer_and_set_caps (mix->srcpad, GST_BUFFER_OFFSET_NONE,
- outsize, GST_PAD_CAPS (mix->srcpad), &outbuf);
}
+ /* allocate an output buffer */
+ outsize =
+ gst_video_format_get_size (mix->fmt, mix->out_width, mix->out_height);
+ ret =
+ gst_pad_alloc_buffer_and_set_caps (mix->srcpad, GST_BUFFER_OFFSET_NONE,
+ outsize, GST_PAD_CAPS (mix->srcpad), &outbuf);
+
/* This must be set at this point, otherwise we have no src caps */
g_assert (mix->blend != NULL);