diff --git a/ChangeLog b/ChangeLog index dd2b41e55d..65c52709a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-06 Wim Taymans + + * gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps): + Fix case where we don't have a range for the rates or channels as is the + case with truespeech. + 2008-11-05 Wim Taymans * gst/volume/gstvolume.c: (volume_update_real_volume), diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c index 45458ca9b1..21e885cbcf 100644 --- a/gst-libs/gst/riff/riff-media.c +++ b/gst-libs/gst/riff/riff-media.c @@ -1408,9 +1408,16 @@ gst_riff_create_audio_caps (guint16 codec_id, } } else { if (rate_chan) { - gst_caps_set_simple (caps, - "rate", GST_TYPE_INT_RANGE, rate_min, rate_max, - "channels", GST_TYPE_INT_RANGE, 1, channels_max, NULL); + if (rate_min == rate_max) + gst_caps_set_simple (caps, "rate", G_TYPE_INT, rate_min, NULL); + else + gst_caps_set_simple (caps, + "rate", GST_TYPE_INT_RANGE, rate_min, rate_max, NULL); + if (channels_max == 1) + gst_caps_set_simple (caps, "channels", G_TYPE_INT, 1, NULL); + else + gst_caps_set_simple (caps, + "channels", GST_TYPE_INT_RANGE, 1, channels_max, NULL); } if (block_align) { gst_caps_set_simple (caps,