diff options
author | Kelvie Wong <kelvie@ieee.org> | 2010-04-02 01:42:07 -0700 |
---|---|---|
committer | Kelvie Wong <kelvie@ieee.org> | 2010-04-02 01:42:07 -0700 |
commit | edc1d619f78897a5ea382c335a1dd9b2818002fe (patch) | |
tree | 7abcab1497e8df90218d9600fbb0b81e81dbbbb2 | |
parent | 7706ddf611959d5ca58c47b5618f23f9b4be496a (diff) | |
download | xine-lib-edc1d619f78897a5ea382c335a1dd9b2818002fe.tar.gz xine-lib-edc1d619f78897a5ea382c335a1dd9b2818002fe.tar.bz2 |
demux_tta: fix some dumb truncation errors
I don't know why I multiplied by integers _outside_ the parentheses. I blame
late nights.
Regardless, this fixes the skip every 24 seconds due to the truncation of
FRAME_TIME. The input_time is also more accurate for e.g. stopping cue tracks.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/demuxers/demux_tta.c | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -5,6 +5,7 @@ xine-lib (1.1.19) 2010-??-?? * Add support for Ogg tag 'DISCNUMBER' and ID3 tag 'TPOS'. * Add support for EAC3. * Recognise video/mp2t and video/mp2p. + * TTA fixes. xine-lib (1.1.18.1) 2010-03-06 * Oops. compat.c (for DXR3 support) was omitted. diff --git a/src/demuxers/demux_tta.c b/src/demuxers/demux_tta.c index 03d15045d..10229ed64 100644 --- a/src/demuxers/demux_tta.c +++ b/src/demuxers/demux_tta.c @@ -129,7 +129,7 @@ static int demux_tta_send_chunk(demux_plugin_t *this_gen) { /* Get a buffer */ buf = this->audio_fifo->buffer_pool_alloc(this->audio_fifo); buf->type = BUF_AUDIO_TTA; - buf->pts = (int64_t)(FRAME_TIME * this->currentframe) * 90000; + buf->pts = (int64_t)(FRAME_TIME * this->currentframe * 90000); buf->extra_info->total_time = (int)(le2me_32(this->header.tta.data_length) * 1000.0 / le2me_32(this->header.tta.samplerate)); /* milliseconds */ buf->decoder_flags = 0; @@ -138,7 +138,7 @@ static int demux_tta_send_chunk(demux_plugin_t *this_gen) { (int) ((double) this->currentframe * 65535 / this->totalframes); /* Set time */ - buf->extra_info->input_time = (int)(FRAME_TIME * this->currentframe)*1000; + buf->extra_info->input_time = (int)(FRAME_TIME * this->currentframe * 1000); bytes_read = this->input->read(this->input, buf->content, ( bytes_to_read > buf->max_size ) ? buf->max_size : bytes_to_read); if (bytes_read < 0) { |