summaryrefslogtreecommitdiffstats
path: root/ext/audiofile/gstafsrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/audiofile/gstafsrc.c')
-rw-r--r--ext/audiofile/gstafsrc.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/ext/audiofile/gstafsrc.c b/ext/audiofile/gstafsrc.c
index 630e79d9..ae4e54a2 100644
--- a/ext/audiofile/gstafsrc.c
+++ b/ext/audiofile/gstafsrc.c
@@ -350,21 +350,20 @@ gst_afsrc_open_file (GstAFSrc *src)
/* set caps on src */
//FIXME: add all the possible formats, especially float ! */
- gst_pad_set_caps (src->srcpad, gst_caps_new (
- "af_src",
- "audio/raw",
- gst_props_new (
- "format", GST_PROPS_STRING ("int"),
- "law", GST_PROPS_INT (0), //FIXME
- "endianness", GST_PROPS_INT (G_BYTE_ORDER), //FIXME
- "signed", GST_PROPS_BOOLEAN (src->is_signed),
- "width", GST_PROPS_INT (src->width),
- "depth", GST_PROPS_INT (src->width),
- "rate", GST_PROPS_INT (src->rate),
- "channels", GST_PROPS_INT (src->channels),
- NULL
- )
- ));
+ gst_pad_try_set_caps (src->srcpad,
+ GST_CAPS_NEW (
+ "af_src",
+ "audio/raw",
+ "format", GST_PROPS_STRING ("int"),
+ "law", GST_PROPS_INT (0), //FIXME
+ "endianness", GST_PROPS_INT (G_BYTE_ORDER), //FIXME
+ "signed", GST_PROPS_BOOLEAN (src->is_signed),
+ "width", GST_PROPS_INT (src->width),
+ "depth", GST_PROPS_INT (src->width),
+ "rate", GST_PROPS_INT (src->rate),
+ "channels", GST_PROPS_INT (src->channels)
+ )
+ );
GST_FLAG_SET (src, GST_AFSRC_OPEN);