diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2010-02-22 19:37:03 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2010-02-22 19:37:03 +0000 |
commit | 96e0741443a7e7ccb3720ddbdce59d83a596363e (patch) | |
tree | e84fdb764b2d9f3272644bb4207bf4a38cedc581 | |
parent | 1aa9a2e68b20f0f929f02bcae3a15e74c768079b (diff) | |
download | xine-lib-96e0741443a7e7ccb3720ddbdce59d83a596363e.tar.gz xine-lib-96e0741443a7e7ccb3720ddbdce59d83a596363e.tar.bz2 |
Swap round if/while in LPCM 24-bit handling.
This will reduce logspam with little-endian streams, which Can't Happen anyway.
-rw-r--r-- | src/libxineadec/xine_lpcm_decoder.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libxineadec/xine_lpcm_decoder.c b/src/libxineadec/xine_lpcm_decoder.c index 7438e26e6..6f4e71003 100644 --- a/src/libxineadec/xine_lpcm_decoder.c +++ b/src/libxineadec/xine_lpcm_decoder.c @@ -269,8 +269,8 @@ static void lpcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { uint8_t *d = (uint8_t *)audio_buffer->mem; int n = buf_size; - while (n >= 12) { - if ( stream_be ) { + if ( stream_be ) { + while (n >= 12) { if ( stream_be == this->cpu_be ) { *d++ = s[0]; *d++ = s[1]; @@ -290,12 +290,11 @@ static void lpcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { *d++ = s[7]; *d++ = s[6]; } - } else { - xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "lpcm_decoder: I don't know what should decode lpcm 24bit little endian byte stream"); + s += 12; + n -= 12; } - - s += 12; - n -= 12; + } else { + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "lpcm_decoder: I don't know what should decode lpcm 24bit little endian byte stream"); } if ( (d - (uint8_t*)audio_buffer->mem)/2*3 < buf_size ) |