gst-libs/gst/riff/riff-media.c: PCM samples with width=8 must be always unsigned...
authorSebastian Dröge <slomo@circular-chaos.org>
Thu, 29 Mar 2007 12:07:02 +0000 (12:07 +0000)
committerSebastian Dröge <slomo@circular-chaos.org>
Thu, 29 Mar 2007 12:07:02 +0000 (12:07 +0000)
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.

ChangeLog
gst-libs/gst/riff/riff-media.c

index 2d74d384393aeda8917e4a2b6d8f54166b50dd19..21739254215f909743c6cc244d2d8b85437e9444 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 274d9b808d52fa3c4ed8160fc55c6c90f89299ea..96d9f89547aa73d23b7edcd60b1ff3acf85d2ed9 100644 (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