gst-libs/gst/riff/riff-media.c: PCM samples with width=8 must be always unsigned, no matter what depth they have.

Original commit message from CVS:
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
PCM samples with width=8 must be always unsigned, no matter what
depth they have.
This commit is contained in:
Sebastian Dröge 2007-03-29 12:07:02 +00:00
parent af17f81a47
commit dfdd873f6a
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2007-03-29 Sebastian Dröge <slomo@circular-chaos.org>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
PCM samples with width=8 must be always unsigned, no matter what
depth they have.
2007-03-29 Andy Wingo <wingo@pobox.com>
* gst/videorate/gstvideorate.c (gst_video_rate_flush_prev): Make

View file

@ -756,12 +756,13 @@ gst_riff_create_audio_caps (guint16 codec_id,
gint ba = strf->blockalign;
gint ch = strf->channels;
gint ws = strf->size;
gint wd = ba * 8 / ch;
caps = gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
"channels", G_TYPE_INT, ch,
"width", G_TYPE_INT, (int) (ba * 8 / ch),
"depth", G_TYPE_INT, ws, "signed", G_TYPE_BOOLEAN, ws != 8, NULL);
"width", G_TYPE_INT, wd,
"depth", G_TYPE_INT, ws, "signed", G_TYPE_BOOLEAN, wd != 8, NULL);
/* Add default MS channel layout if we have more than 2 channels,
* but the layout isn't specified like with WAVEEXT below. Not sure