mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
celtdec: Read the additional, optional extra headers from the caps too
This commit is contained in:
parent
f7473a6102
commit
f543ac34f3
1 changed files with 19 additions and 0 deletions
|
@ -140,6 +140,9 @@ gst_celt_dec_reset (GstCeltDec * dec)
|
|||
|
||||
gst_buffer_replace (&dec->streamheader, NULL);
|
||||
gst_buffer_replace (&dec->vorbiscomment, NULL);
|
||||
g_list_foreach (dec->extra_headers, (GFunc) gst_mini_object_unref, NULL);
|
||||
g_list_free (dec->extra_headers);
|
||||
dec->extra_headers = NULL;
|
||||
|
||||
memset (&dec->header, 0, sizeof (dec->header));
|
||||
}
|
||||
|
@ -206,6 +209,22 @@ celt_dec_sink_setcaps (GstPad * pad, GstCaps * caps)
|
|||
goto done;
|
||||
gst_buffer_replace (&dec->vorbiscomment, buf);
|
||||
}
|
||||
|
||||
g_list_foreach (dec->extra_headers, (GFunc) gst_mini_object_unref, NULL);
|
||||
g_list_free (dec->extra_headers);
|
||||
dec->extra_headers = NULL;
|
||||
|
||||
if (gst_value_array_get_size (streamheader) > 2) {
|
||||
gint i, n;
|
||||
|
||||
n = gst_value_array_get_size (streamheader);
|
||||
for (i = 2; i < n; i++) {
|
||||
header = gst_value_array_get_value (streamheader, i);
|
||||
buf = gst_value_get_buffer (header);
|
||||
dec->extra_headers =
|
||||
g_list_prepend (dec->extra_headers, gst_buffer_ref (buf));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
done:
|
||||
|
|
Loading…
Reference in a new issue