From ec250d49d02e6d83cc037de11d8cbccaa83fa827 Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Sun, 25 Jul 2004 15:05:06 +0000 Subject: [PATCH] Set the explicit caps on the pad when the file is parsed as explicit caps get wiped during state changes. fixes bug #... Original commit message from CVS: Set the explicit caps on the pad when the file is parsed as explicit caps get wiped during state changes. fixes bug #148043 --- ChangeLog | 6 ++++++ gst/wavparse/gstwavparse.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 432207a3be..b62aa5e380 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-07-25 Iain + + * gst/wavparse/gstwavparse.c (gst_wavparse_fmt): Set the caps on the + pad now rather than when the pad is created because state changes wipe + explicit caps (fixes #148043). + 2004-07-25 Sebastien Cote reviewed by Benjamin Otte diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c index 86db360f03..fb61932ccb 100644 --- a/gst/wavparse/gstwavparse.c +++ b/gst/wavparse/gstwavparse.c @@ -542,13 +542,14 @@ gst_wavparse_fmt (GstWavParse * wav) wav->depth = header->size; wav->bps = header->av_bps; + gst_element_add_pad (GST_ELEMENT (wav), wav->srcpad); + caps = gst_riff_create_audio_caps (header->format, NULL, header, NULL); if (caps) { gst_pad_set_explicit_caps (wav->srcpad, caps); gst_caps_free (caps); } - gst_element_add_pad (GST_ELEMENT (wav), wav->srcpad); GST_DEBUG ("frequency %d, channels %d", wav->rate, wav->channels);