diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2004-10-25 09:56:12 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2004-10-25 09:56:12 +0000 |
commit | 9a1ce099b7f02274efe09887a00a1b21a83be27f (patch) | |
tree | 319dcd904a8753423921d8a1ee46abcebb7bae52 /ext/speex | |
parent | ddaa429efb64fd7878d41268dd764fb3224d0411 (diff) |
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).
Diffstat (limited to 'ext/speex')
-rw-r--r-- | ext/speex/gstspeexdec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c index f362c4a1..7b4ef94f 100644 --- a/ext/speex/gstspeexdec.c +++ b/ext/speex/gstspeexdec.c @@ -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) { |