mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-24 17:44:14 +00:00
aiffmux: allocate byte writer on stack
This commit is contained in:
parent
c08c99b894
commit
8990a61221
1 changed files with 6 additions and 6 deletions
|
@ -242,7 +242,7 @@ gst_aiff_mux_push_header (GstAiffMux * aiffmux, guint32 audio_data_size)
|
||||||
{
|
{
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
GstBuffer *outbuf;
|
GstBuffer *outbuf;
|
||||||
GstByteWriter *writer;
|
GstByteWriter writer;
|
||||||
GstSegment seg;
|
GstSegment seg;
|
||||||
|
|
||||||
/* seek to beginning of file */
|
/* seek to beginning of file */
|
||||||
|
@ -258,13 +258,13 @@ gst_aiff_mux_push_header (GstAiffMux * aiffmux, guint32 audio_data_size)
|
||||||
GST_DEBUG_OBJECT (aiffmux, "writing header with datasize=%u",
|
GST_DEBUG_OBJECT (aiffmux, "writing header with datasize=%u",
|
||||||
audio_data_size);
|
audio_data_size);
|
||||||
|
|
||||||
writer = gst_byte_writer_new_with_size (AIFF_HEADER_LEN, TRUE);
|
gst_byte_writer_init_with_size (&writer, AIFF_HEADER_LEN, TRUE);
|
||||||
|
|
||||||
gst_aiff_mux_write_form_header (aiffmux, audio_data_size, writer);
|
gst_aiff_mux_write_form_header (aiffmux, audio_data_size, &writer);
|
||||||
gst_aiff_mux_write_comm_header (aiffmux, audio_data_size, writer);
|
gst_aiff_mux_write_comm_header (aiffmux, audio_data_size, &writer);
|
||||||
gst_aiff_mux_write_ssnd_header (aiffmux, audio_data_size, writer);
|
gst_aiff_mux_write_ssnd_header (aiffmux, audio_data_size, &writer);
|
||||||
|
|
||||||
outbuf = gst_byte_writer_free_and_get_buffer (writer);
|
outbuf = gst_byte_writer_reset_and_get_buffer (&writer);
|
||||||
|
|
||||||
ret = gst_pad_push (aiffmux->srcpad, outbuf);
|
ret = gst_pad_push (aiffmux->srcpad, outbuf);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue