summaryrefslogtreecommitdiffstats
path: root/gst/smpte
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2007-01-19 09:48:47 +0000
committerEdward Hervey <bilboed@bilboed.com>2007-01-19 09:48:47 +0000
commit5d45f48fcaed07e6c40ba46c1fadef9ce992ecaa (patch)
treeea271deb77b0b58d6c4116bd33c0a107db0e0f60 /gst/smpte
parent914b79faa6ee937962b5433d0d7906b41c1c46be (diff)
gst/smpte/gstsmpte.c: Allocate buffers of the right size.
Original commit message from CVS: * gst/smpte/gstsmpte.c: (gst_smpte_collected): Allocate buffers of the right size. The proper size of a I420 buffer in bytes is: width * height * 3 ------------------ 2
Diffstat (limited to 'gst/smpte')
-rw-r--r--gst/smpte/gstsmpte.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/smpte/gstsmpte.c b/gst/smpte/gstsmpte.c
index eceb3587..dc0c0a8c 100644
--- a/gst/smpte/gstsmpte.c
+++ b/gst/smpte/gstsmpte.c
@@ -436,17 +436,17 @@ gst_smpte_collected (GstCollectPads * pads, GstSMPTE * smpte)
if (in1 == NULL) {
/* if no input, make picture black */
- in1 = gst_buffer_new_and_alloc (smpte->width * smpte->height * 3);
+ in1 = gst_buffer_new_and_alloc (smpte->width * smpte->height * 3 / 2);
fill_i420 (GST_BUFFER_DATA (in1), smpte->width, smpte->height, 7);
}
if (in2 == NULL) {
/* if no input, make picture white */
- in2 = gst_buffer_new_and_alloc (smpte->width * smpte->height * 3);
+ in2 = gst_buffer_new_and_alloc (smpte->width * smpte->height * 3 / 2);
fill_i420 (GST_BUFFER_DATA (in2), smpte->width, smpte->height, 0);
}
if (smpte->position < smpte->end_position) {
- outbuf = gst_buffer_new_and_alloc (smpte->width * smpte->height * 3);
+ outbuf = gst_buffer_new_and_alloc (smpte->width * smpte->height * 3 / 2);
/* set caps if not done yet */
if (!GST_PAD_CAPS (smpte->srcpad)) {