ext/speex/gstspeexdec.c: sinkconvert function so oggdemux can get the file length (totem).

Original commit message from CVS:
* ext/speex/gstspeexdec.c: (gst_speex_dec_init),
(speex_dec_convert):
sinkconvert function so oggdemux can get the file length (totem).
This commit is contained in:
Ronald S. Bultje 2004-10-25 09:56:12 +00:00
parent ddaa429efb
commit 9a1ce099b7
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2004-10-25 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/speex/gstspeexdec.c: (gst_speex_dec_init),
(speex_dec_convert):
sinkconvert function so oggdemux can get the file length (totem).
2004-10-25 James Morrison <ja2morri@csclub.uwaterloo.ca>
Reviewd by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>

View file

@ -170,6 +170,7 @@ gst_speex_dec_init (GstSpeexDec * dec)
(&speex_dec_sink_factory), "sink");
gst_pad_set_chain_function (dec->sinkpad, speex_dec_chain);
gst_pad_set_formats_function (dec->sinkpad, speex_dec_get_formats);
gst_pad_set_convert_function (dec->sinkpad, speex_dec_convert);
gst_element_add_pad (GST_ELEMENT (dec), dec->sinkpad);
dec->srcpad =
@ -203,6 +204,10 @@ speex_dec_convert (GstPad * pad,
if (dec->packetno < 1)
return FALSE;
if (pad == dec->sinkpad &&
(src_format == GST_FORMAT_BYTES || *dest_format == GST_FORMAT_BYTES))
return FALSE;
switch (src_format) {
case GST_FORMAT_TIME:
switch (*dest_format) {