Commit d51693e9 authored by Wim Taymans's avatar Wim Taymans Committed by Jan Schmidt

gst-libs/gst/riff/riff-media.c: In riff, the depth is stored in the size field...

gst-libs/gst/riff/riff-media.c: In riff, the depth is stored in the size field but it just means that the least signi...

Original commit message from CVS:
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
In riff, the depth is stored in the size field but it just means that
the least significant bits are cleared. We can therefore just play
the sample as if it had a depth == width. Fixes: #440997
Patch by: Wim Taymans <wim@fluendo.com>
Patch by: Sebastian Dröge  <slomo@circular-chaos.org>
parent d6ef01a8
2007-05-31 Jan Schmidt <thaytan@mad.scientist.com>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
In riff, the depth is stored in the size field but it just means that
the least significant bits are cleared. We can therefore just play
the sample as if it had a depth == width. Fixes: #440997
Patch by: Wim Taymans <wim@fluendo.com>
Patch by: Sebastian Dröge <slomo@circular-chaos.org>
2007-05-31 Jan Schmidt <thaytan@mad.scientist.com>
* gst-libs/gst/floatcast/floatcast.h:
Define inline when needed on win32 builds. Fixes: #441295
Patch by: Sebastien Moutte <sebastien@moutte.net>
2007-05-29 Wim Taymans <wim@fluendo.com>
......@@ -766,7 +766,11 @@ gst_riff_create_audio_caps (guint16 codec_id,
strf->size);
strf->size = 8 * (guint) ceil (wd / 8.0);
}
ws = strf->size;
/* in riff, the depth is stored in the size field but it just means that
* the _least_ significant bits are cleared. We can therefore just play
* the sample as if it had a depth == width */
/* For reference, the actual depth is in strf->size */
ws = wd;
caps = gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
......@@ -1083,11 +1087,18 @@ gst_riff_create_audio_caps (guint16 codec_id,
GST_DEBUG ("PCM");
if (strf != NULL) {
gint ba = strf->blockalign;
gint ws = strf->size;
gint wd = ba * 8 / strf->channels;
gint ws;
if (valid_bits_per_sample != 0)
ws = valid_bits_per_sample;
/* in riff, the depth is stored in the size field but it just
* means that the _least_ significant bits are cleared. We can
* therefore just play the sample as if it had a depth == width */
ws = wd;
/* For reference, use this to get the actual depth:
* ws = strf->size;
* if (valid_bits_per_sample != 0)
* ws = valid_bits_per_sample; */
caps = gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
......
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