From: Darren S. <li...@yo...> - 2010-02-22 19:49:58
|
# HG changeset patch # User Darren Salt <li...@yo...> # Date 1266867423 0 # Node ID dfaad68b7e858d9d19ef48bbad92a1c2e23c4d01 # Parent 7b6c2dc0ac985dcf2590e50794319963babd0128 Swap round if/while in LPCM 24-bit handling. This will reduce logspam with little-endian streams, which Can't Happen anyway. diff --git a/src/libxineadec/xine_lpcm_decoder.c b/src/libxineadec/xine_lpcm_decoder.c --- a/src/libxineadec/xine_lpcm_decoder.c +++ b/src/libxineadec/xine_lpcm_decoder.c @@ -269,8 +269,8 @@ 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 @@ *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 ) |