mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
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
This commit is contained in:
parent
914b79faa6
commit
5d45f48fca
2 changed files with 13 additions and 3 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2007-01-19 Edward Hervey <edward@fluendo.com>
|
||||
|
||||
* 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
|
||||
|
||||
2007-01-18 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/smpte/gstsmpte.c: (gst_smpte_init):
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue