From dfdd873f6ac6fd41ab1dd2ac8b6fe9ee157bd256 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 29 Mar 2007 12:07:02 +0000 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ gst-libs/gst/riff/riff-media.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d74d38439..2173925421 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-03-29 Sebastian Dröge + + * 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 * gst/videorate/gstvideorate.c (gst_video_rate_flush_prev): Make diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c index 274d9b808d..96d9f89547 100644 --- a/gst-libs/gst/riff/riff-media.c +++ b/gst-libs/gst/riff/riff-media.c @@ -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 -- 2.34.1