diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-12-24 20:27:57 +0100 |
---|---|---|
committer | Wim Taymans <wim@metal.(none)> | 2009-12-24 21:45:12 +0100 |
commit | 3c0f18d765d86df2a545c4152b944a80d35f1631 (patch) | |
tree | c0693282f615ce1f717ad39c31ab3d602fa017ca | |
parent | ac03ad782a9bc059089fd1a91eb00a9b1ba05186 (diff) |
videomixer: some trivial cleanups
-rw-r--r-- | gst/videomixer/videomixer.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/gst/videomixer/videomixer.c b/gst/videomixer/videomixer.c index f404c286c..230f1a5df 100644 --- a/gst/videomixer/videomixer.c +++ b/gst/videomixer/videomixer.c | |||
@@ -1380,21 +1380,16 @@ gst_videomixer_collected (GstCollectPads * pads, GstVideoMixer * mix) | |||
1380 | 1380 | ||
1381 | /* Calculating out buffer size from input size */ | 1381 | /* Calculating out buffer size from input size */ |
1382 | gst_pad_set_caps (mix->srcpad, newcaps); | 1382 | gst_pad_set_caps (mix->srcpad, newcaps); |
1383 | outsize = | ||
1384 | gst_video_format_get_size (mix->fmt, mix->out_width, mix->out_height); | ||
1385 | ret = | ||
1386 | gst_pad_alloc_buffer_and_set_caps (mix->srcpad, GST_BUFFER_OFFSET_NONE, | ||
1387 | outsize, newcaps, &outbuf); | ||
1388 | gst_caps_unref (newcaps); | 1383 | gst_caps_unref (newcaps); |
1389 | } else { /* Otherwise we just allocate a buffer from current caps */ | ||
1390 | /* Calculating out buffer size from input size */ | ||
1391 | outsize = | ||
1392 | gst_video_format_get_size (mix->fmt, mix->out_width, mix->out_height); | ||
1393 | ret = | ||
1394 | gst_pad_alloc_buffer_and_set_caps (mix->srcpad, GST_BUFFER_OFFSET_NONE, | ||
1395 | outsize, GST_PAD_CAPS (mix->srcpad), &outbuf); | ||
1396 | } | 1384 | } |
1397 | 1385 | ||
1386 | /* allocate an output buffer */ | ||
1387 | outsize = | ||
1388 | gst_video_format_get_size (mix->fmt, mix->out_width, mix->out_height); | ||
1389 | ret = | ||
1390 | gst_pad_alloc_buffer_and_set_caps (mix->srcpad, GST_BUFFER_OFFSET_NONE, | ||
1391 | outsize, GST_PAD_CAPS (mix->srcpad), &outbuf); | ||
1392 | |||
1398 | /* This must be set at this point, otherwise we have no src caps */ | 1393 | /* This must be set at this point, otherwise we have no src caps */ |
1399 | g_assert (mix->blend != NULL); | 1394 | g_assert (mix->blend != NULL); |
1400 | 1395 | ||