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>
This commit is contained in:
parent
d6ef01a879
commit
d51693e960
11
ChangeLog
11
ChangeLog
@ -1,7 +1,18 @@
|
|||||||
|
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>
|
2007-05-31 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
* gst-libs/gst/floatcast/floatcast.h:
|
* gst-libs/gst/floatcast/floatcast.h:
|
||||||
Define inline when needed on win32 builds. Fixes: #441295
|
Define inline when needed on win32 builds. Fixes: #441295
|
||||||
|
Patch by: Sebastien Moutte <sebastien@moutte.net>
|
||||||
|
|
||||||
2007-05-29 Wim Taymans <wim@fluendo.com>
|
2007-05-29 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
@ -766,7 +766,11 @@ gst_riff_create_audio_caps (guint16 codec_id,
|
|||||||
strf->size);
|
strf->size);
|
||||||
strf->size = 8 * (guint) ceil (wd / 8.0);
|
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",
|
caps = gst_caps_new_simple ("audio/x-raw-int",
|
||||||
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
|
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
|
||||||
@ -1083,11 +1087,18 @@ gst_riff_create_audio_caps (guint16 codec_id,
|
|||||||
GST_DEBUG ("PCM");
|
GST_DEBUG ("PCM");
|
||||||
if (strf != NULL) {
|
if (strf != NULL) {
|
||||||
gint ba = strf->blockalign;
|
gint ba = strf->blockalign;
|
||||||
gint ws = strf->size;
|
|
||||||
gint wd = ba * 8 / strf->channels;
|
gint wd = ba * 8 / strf->channels;
|
||||||
|
gint ws;
|
||||||
|
|
||||||
if (valid_bits_per_sample != 0)
|
/* in riff, the depth is stored in the size field but it just
|
||||||
ws = valid_bits_per_sample;
|
* 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",
|
caps = gst_caps_new_simple ("audio/x-raw-int",
|
||||||
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
|
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user