summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2002-11-29 18:38:02 +0000
committerMike Melanson <mike@multimedia.cx>2002-11-29 18:38:02 +0000
commit41eb3f243efddb860d16d2c0e00e5aa715fbc4fe (patch)
treeb0b49b0d657e7a5f4ec9259195a56963855a7f04 /src
parent4baae51b8b448ed4e74278e0468cac4a61c32abc (diff)
downloadxine-lib-41eb3f243efddb860d16d2c0e00e5aa715fbc4fe.tar.gz
xine-lib-41eb3f243efddb860d16d2c0e00e5aa715fbc4fe.tar.bz2
added special case to enable playback of signed 8-bit data
CVS patchset: 3390 CVS date: 2002/11/29 18:38:02
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_qt.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c
index c76d8909a..e4a1d1bdc 100644
--- a/src/demuxers/demux_qt.c
+++ b/src/demuxers/demux_qt.c
@@ -30,7 +30,7 @@
* build_frame_table
* free_qt_info
*
- * $Id: demux_qt.c,v 1.121 2002/11/28 10:21:06 petli Exp $
+ * $Id: demux_qt.c,v 1.122 2002/11/29 18:38:02 tmmm Exp $
*
*/
@@ -98,6 +98,8 @@ typedef unsigned int qt_atom;
#define IMA4_FOURCC QT_ATOM('i', 'm', 'a', '4')
#define MP4A_FOURCC QT_ATOM('m', 'p', '4', 'a')
+#define TWOS_FOURCC QT_ATOM('t', 'w', 'o', 's')
+#define SOWT_FOURCC QT_ATOM('s', 'o', 'w', 't')
#define UDTA_ATOM QT_ATOM('u', 'd', 't', 'a')
#define CPY_ATOM QT_ATOM(0xA9, 'c', 'p', 'y')
@@ -1873,6 +1875,14 @@ static int demux_qt_send_chunk(demux_plugin_t *this_gen) {
break;
}
+ /* Special case alert: If this is signed, 8-bit data, transform
+ * the data to unsigned. */
+ if ((this->qt->audio_bits == 8) &&
+ ((this->qt->audio_codec == TWOS_FOURCC) ||
+ (this->qt->audio_codec == SOWT_FOURCC)))
+ for (j = 0; j < buf->size; j++)
+ buf->content[j] += 0x80;
+
if (!remaining_sample_bytes) {
buf->decoder_flags |= BUF_FLAG_FRAME_END;