gst-libs/gst/riff/riff-media.c: Set the maximum number of channels for PCM and float in the correct place to have it ...

Original commit message from CVS:
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
Set the maximum number of channels for PCM and float in the correct
place to have it also used when creating the template caps.
This commit is contained in:
Sebastian Dröge 2007-04-17 02:04:21 +00:00
parent 3effb4d23e
commit cef23b669c
2 changed files with 10 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2007-04-17 Sebastian Dröge <slomo@circular-chaos.org>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
Set the maximum number of channels for PCM and float in the correct
place to have it also used when creating the template caps.
2007-04-17 Sebastian Dröge <slomo@circular-chaos.org>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):

View file

@ -753,14 +753,14 @@ gst_riff_create_audio_caps (guint16 codec_id,
switch (codec_id) {
case GST_RIFF_WAVE_FORMAT_PCM: /* PCM */
channels_max = 8;
if (strf != NULL) {
gint ba = strf->blockalign;
gint ch = strf->channels;
gint wd = ba * 8 / ch;
gint ws;
channels_max = 8;
if (strf->size > 32) {
GST_WARNING ("invalid depth (%d) of pcm audio, overwriting.",
strf->size);
@ -827,13 +827,13 @@ gst_riff_create_audio_caps (guint16 codec_id,
break;
case GST_RIFF_WAVE_FORMAT_IEEE_FLOAT:
channels_max = 8;
if (strf != NULL) {
gint ba = strf->blockalign;
gint ch = strf->channels;
gint wd = ba * 8 / ch;
channels_max = 8;
caps = gst_caps_new_simple ("audio/x-raw-float",
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
"channels", G_TYPE_INT, ch, "width", G_TYPE_INT, wd, NULL);