mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
ext/ogg/gstoggmux.c (gst_ogg_mux_set_header_on_caps): ext/ogg/gstoggparse.c (gst_ogg_parse_append_header)
Original commit message from CVS: 2005-11-21 Andy Wingo <wingo@pobox.com> patch by: Alessandro Dessina <alessandro nnva org> * ext/ogg/gstoggmux.c (gst_ogg_mux_set_header_on_caps): * ext/ogg/gstoggparse.c (gst_ogg_parse_append_header) (gst_ogg_parse_chain): * ext/theora/theoraenc.c (theora_set_header_on_caps): * ext/vorbis/vorbisenc.c (gst_vorbisenc_set_header_on_caps): * ext/vorbis/vorbisparse.c (vorbis_parse_set_header_on_caps): Fix gst_value_list calls on arrays. Fixes #321962.
This commit is contained in:
parent
46db91babf
commit
6483710419
6 changed files with 46 additions and 34 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2005-11-21 Andy Wingo <wingo@pobox.com>
|
||||
|
||||
patch by: Alessandro Dessina <alessandro nnva org>
|
||||
|
||||
* ext/ogg/gstoggmux.c (gst_ogg_mux_set_header_on_caps):
|
||||
* ext/ogg/gstoggparse.c (gst_ogg_parse_append_header)
|
||||
(gst_ogg_parse_chain):
|
||||
* ext/theora/theoraenc.c (theora_set_header_on_caps):
|
||||
* ext/vorbis/vorbisenc.c (gst_vorbisenc_set_header_on_caps):
|
||||
* ext/vorbis/vorbisparse.c (vorbis_parse_set_header_on_caps): Fix
|
||||
gst_value_list calls on arrays. Fixes #321962.
|
||||
|
||||
2005-11-21 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* ext/ogg/gstoggmux.c: (gst_ogg_mux_init),
|
||||
|
|
|
@ -768,7 +768,7 @@ static GstCaps *
|
|||
gst_ogg_mux_set_header_on_caps (GstCaps * caps, GList * buffers)
|
||||
{
|
||||
GstStructure *structure;
|
||||
GValue list = { 0 };
|
||||
GValue array = { 0 };
|
||||
GList *walk = buffers;
|
||||
|
||||
caps = gst_caps_make_writable (caps);
|
||||
|
@ -776,7 +776,7 @@ gst_ogg_mux_set_header_on_caps (GstCaps * caps, GList * buffers)
|
|||
structure = gst_caps_get_structure (caps, 0);
|
||||
|
||||
/* put buffers in a fixed list */
|
||||
g_value_init (&list, GST_TYPE_ARRAY);
|
||||
g_value_init (&array, GST_TYPE_ARRAY);
|
||||
|
||||
while (walk) {
|
||||
GstBuffer *buf = GST_BUFFER (walk->data);
|
||||
|
@ -790,11 +790,11 @@ gst_ogg_mux_set_header_on_caps (GstCaps * caps, GList * buffers)
|
|||
|
||||
g_value_init (&value, GST_TYPE_BUFFER);
|
||||
gst_value_set_buffer (&value, buf);
|
||||
gst_value_list_append_value (&list, &value);
|
||||
gst_value_array_append_value (&array, &value);
|
||||
g_value_unset (&value);
|
||||
}
|
||||
gst_structure_set_value (structure, "streamheader", &list);
|
||||
g_value_unset (&list);
|
||||
gst_structure_set_value (structure, "streamheader", &array);
|
||||
g_value_unset (&array);
|
||||
|
||||
return caps;
|
||||
}
|
||||
|
|
|
@ -298,7 +298,7 @@ gst_ogg_parse_submit_buffer (GstOggParse * ogg, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_ogg_parse_append_header (GValue * list, GstBuffer * buf)
|
||||
gst_ogg_parse_append_header (GValue * array, GstBuffer * buf)
|
||||
{
|
||||
GValue value = { 0 };
|
||||
|
||||
|
@ -306,7 +306,7 @@ gst_ogg_parse_append_header (GValue * list, GstBuffer * buf)
|
|||
|
||||
g_value_init (&value, GST_TYPE_BUFFER);
|
||||
gst_value_set_buffer (&value, buf);
|
||||
gst_value_list_append_value (list, &value);
|
||||
gst_value_array_append_value (array, &value);
|
||||
g_value_unset (&value);
|
||||
|
||||
}
|
||||
|
@ -501,11 +501,11 @@ gst_ogg_parse_chain (GstPad * pad, GstBuffer * buffer)
|
|||
*/
|
||||
GstCaps *caps;
|
||||
GstStructure *structure;
|
||||
GValue list = { 0 };
|
||||
GValue array = { 0 };
|
||||
gint i, count = 0;
|
||||
gboolean found_pending_headers = FALSE;
|
||||
|
||||
g_value_init (&list, GST_TYPE_ARRAY);
|
||||
g_value_init (&array, GST_TYPE_ARRAY);
|
||||
|
||||
for (i = 0; i < g_slist_length (ogg->oggstreams); i++) {
|
||||
GstOggStream *stream = g_slist_nth_data (ogg->oggstreams, i);
|
||||
|
@ -516,7 +516,7 @@ gst_ogg_parse_chain (GstPad * pad, GstBuffer * buffer)
|
|||
goto failure;
|
||||
}
|
||||
|
||||
gst_ogg_parse_append_header (&list,
|
||||
gst_ogg_parse_append_header (&array,
|
||||
GST_BUFFER (stream->headers->data));
|
||||
count++;
|
||||
}
|
||||
|
@ -526,7 +526,7 @@ gst_ogg_parse_chain (GstPad * pad, GstBuffer * buffer)
|
|||
int j;
|
||||
|
||||
for (j = 1; j < g_slist_length (stream->headers); j++) {
|
||||
gst_ogg_parse_append_header (&list,
|
||||
gst_ogg_parse_append_header (&array,
|
||||
GST_BUFFER (g_slist_nth_data (stream->headers, j)));
|
||||
count++;
|
||||
}
|
||||
|
@ -536,11 +536,11 @@ gst_ogg_parse_chain (GstPad * pad, GstBuffer * buffer)
|
|||
caps = gst_caps_make_writable (caps);
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
gst_structure_set_value (structure, "streamheader", &list);
|
||||
gst_structure_set_value (structure, "streamheader", &array);
|
||||
|
||||
gst_pad_set_caps (ogg->srcpad, caps);
|
||||
|
||||
g_value_unset (&list);
|
||||
g_value_unset (&array);
|
||||
|
||||
// gst_caps_free(caps);
|
||||
|
||||
|
|
|
@ -381,7 +381,7 @@ theora_set_header_on_caps (GstCaps * caps, GstBuffer * buf1,
|
|||
GstBuffer * buf2, GstBuffer * buf3)
|
||||
{
|
||||
GstStructure *structure;
|
||||
GValue list = { 0 };
|
||||
GValue array = { 0 };
|
||||
GValue value = { 0 };
|
||||
|
||||
caps = gst_caps_make_writable (caps);
|
||||
|
@ -393,21 +393,21 @@ theora_set_header_on_caps (GstCaps * caps, GstBuffer * buf1,
|
|||
GST_BUFFER_FLAG_SET (buf3, GST_BUFFER_FLAG_IN_CAPS);
|
||||
|
||||
/* put buffers in a fixed list */
|
||||
g_value_init (&list, GST_TYPE_ARRAY);
|
||||
g_value_init (&array, GST_TYPE_ARRAY);
|
||||
g_value_init (&value, GST_TYPE_BUFFER);
|
||||
gst_value_set_buffer (&value, buf1);
|
||||
gst_value_list_append_value (&list, &value);
|
||||
gst_value_array_append_value (&array, &value);
|
||||
g_value_unset (&value);
|
||||
g_value_init (&value, GST_TYPE_BUFFER);
|
||||
gst_value_set_buffer (&value, buf2);
|
||||
gst_value_list_append_value (&list, &value);
|
||||
gst_value_array_append_value (&array, &value);
|
||||
g_value_unset (&value);
|
||||
g_value_init (&value, GST_TYPE_BUFFER);
|
||||
gst_value_set_buffer (&value, buf3);
|
||||
gst_value_list_append_value (&list, &value);
|
||||
gst_structure_set_value (structure, "streamheader", &list);
|
||||
gst_value_array_append_value (&array, &value);
|
||||
gst_structure_set_value (structure, "streamheader", &array);
|
||||
g_value_unset (&value);
|
||||
g_value_unset (&list);
|
||||
g_value_unset (&array);
|
||||
|
||||
return caps;
|
||||
}
|
||||
|
|
|
@ -845,7 +845,7 @@ gst_vorbisenc_set_header_on_caps (GstCaps * caps, GstBuffer * buf1,
|
|||
GstBuffer * buf2, GstBuffer * buf3)
|
||||
{
|
||||
GstStructure *structure;
|
||||
GValue list = { 0 };
|
||||
GValue array = { 0 };
|
||||
GValue value = { 0 };
|
||||
|
||||
caps = gst_caps_make_writable (caps);
|
||||
|
@ -857,21 +857,21 @@ gst_vorbisenc_set_header_on_caps (GstCaps * caps, GstBuffer * buf1,
|
|||
GST_BUFFER_FLAG_SET (buf3, GST_BUFFER_FLAG_IN_CAPS);
|
||||
|
||||
/* put buffers in a fixed list */
|
||||
g_value_init (&list, GST_TYPE_ARRAY);
|
||||
g_value_init (&array, GST_TYPE_ARRAY);
|
||||
g_value_init (&value, GST_TYPE_BUFFER);
|
||||
gst_value_set_buffer (&value, buf1);
|
||||
gst_value_list_append_value (&list, &value);
|
||||
gst_value_array_append_value (&array, &value);
|
||||
g_value_unset (&value);
|
||||
g_value_init (&value, GST_TYPE_BUFFER);
|
||||
gst_value_set_buffer (&value, buf2);
|
||||
gst_value_list_append_value (&list, &value);
|
||||
gst_value_array_append_value (&array, &value);
|
||||
g_value_unset (&value);
|
||||
g_value_init (&value, GST_TYPE_BUFFER);
|
||||
gst_value_set_buffer (&value, buf3);
|
||||
gst_value_list_append_value (&list, &value);
|
||||
gst_structure_set_value (structure, "streamheader", &list);
|
||||
gst_value_array_append_value (&array, &value);
|
||||
gst_structure_set_value (structure, "streamheader", &array);
|
||||
g_value_unset (&value);
|
||||
g_value_unset (&list);
|
||||
g_value_unset (&array);
|
||||
|
||||
return caps;
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ vorbis_parse_set_header_on_caps (GstVorbisParse * parse, GstCaps * caps)
|
|||
{
|
||||
GstBuffer *buf1, *buf2, *buf3;
|
||||
GstStructure *structure;
|
||||
GValue list = { 0 };
|
||||
GValue array = { 0 };
|
||||
GValue value = { 0 };
|
||||
|
||||
g_assert (parse);
|
||||
|
@ -126,21 +126,21 @@ vorbis_parse_set_header_on_caps (GstVorbisParse * parse, GstCaps * caps)
|
|||
GST_BUFFER_FLAG_SET (buf3, GST_BUFFER_FLAG_IN_CAPS);
|
||||
|
||||
/* put buffers in a fixed list */
|
||||
g_value_init (&list, GST_TYPE_ARRAY);
|
||||
g_value_init (&array, GST_TYPE_ARRAY);
|
||||
g_value_init (&value, GST_TYPE_BUFFER);
|
||||
g_value_set_boxed (&value, buf1);
|
||||
gst_value_list_append_value (&list, &value);
|
||||
gst_value_array_append_value (&array, &value);
|
||||
g_value_unset (&value);
|
||||
g_value_init (&value, GST_TYPE_BUFFER);
|
||||
g_value_set_boxed (&value, buf2);
|
||||
gst_value_list_append_value (&list, &value);
|
||||
gst_value_array_append_value (&array, &value);
|
||||
g_value_unset (&value);
|
||||
g_value_init (&value, GST_TYPE_BUFFER);
|
||||
g_value_set_boxed (&value, buf3);
|
||||
gst_value_list_append_value (&list, &value);
|
||||
gst_structure_set_value (structure, "streamheader", &list);
|
||||
gst_value_array_append_value (&array, &value);
|
||||
gst_structure_set_value (structure, "streamheader", &array);
|
||||
g_value_unset (&value);
|
||||
g_value_unset (&list);
|
||||
g_value_unset (&array);
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
|
|
Loading…
Reference in a new issue