Commit cef23b66 authored by Sebastian Dröge's avatar Sebastian Dröge

gst-libs/gst/riff/riff-media.c: Set the maximum number of channels for PCM and...

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.
parent 3effb4d2
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):
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment