Changeset 7b087611c2486e4a76e3bb9f380a36880e713bc0
- Timestamp:
- 12/30/07 05:25:04
(6 months ago)
- Author:
- Pierre d'Herbemont <pdherbemont@videolan.org>
- git-committer:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1198988704 +0000
- git-parent:
[1b26ff77b0fd9ea5d713c7acd52259e6c68efbf5]
- git-author:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1198988704 +0000
- Message:
audio_filter/converter/dtstospdif.c: Fix odd frame sized DTS conversion to SPDIF. Patch by Julien Robert <jul at mac.com>. (Reported to fix most of the current DTS issues).
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rf5a08fa |
r7b08761 |
|
| 123 | 123 | Julien Blache <jb at technologeek.org> - disc ejection code |
|---|
| 124 | 124 | Julien Plissonneau Duquène - JACK audio input module |
|---|
| | 125 | Julien Robert <jul at mac.com> - DTS to SPDIF fixes. |
|---|
| 125 | 126 | Kang Jeong-Hee <keizie at gmail dot com> - Korean translation |
|---|
| 126 | 127 | Kenneth Ostby <kenneo -at- idi -dot- ntnu -dot- no> - Audioscrobbler plugin |
|---|
| r3163d13 |
r7b08761 |
|
| 157 | 157 | for( i_frame = 0; i_frame < 3; i_frame++ ) |
|---|
| 158 | 158 | { |
|---|
| | 159 | uint16_t i_length_padded = i_length; |
|---|
| 159 | 160 | byte_t * p_out = p_out_buf->p_buffer + (i_frame * i_fz); |
|---|
| 160 | 161 | byte_t * p_in = p_filter->p_sys->p_buf + (i_frame * i_length); |
|---|
| … | … | |
| 171 | 172 | { |
|---|
| 172 | 173 | p_filter->p_libvlc->pf_memcpy( p_out, p_sync_be, 6 ); |
|---|
| 173 | | p_out[5] = i_ac5_spdif_type; |
|---|
| | 174 | p_out[4] = i_ac5_spdif_type; |
|---|
| 174 | 175 | p_out[6] = (( i_length ) >> 5 ) & 0xFF; |
|---|
| 175 | 176 | p_out[7] = ( i_length << 3 ) & 0xFF; |
|---|
| … | … | |
| 203 | 204 | } |
|---|
| 204 | 205 | #endif |
|---|
| | 206 | /* If i_length is odd, we have to adjust swapping a bit.. */ |
|---|
| | 207 | if( i_length & 1 ) |
|---|
| | 208 | { |
|---|
| | 209 | p_out[8+i_length-1] = 0; |
|---|
| | 210 | p_out[8+i_length] = p_in[i_length-1]; |
|---|
| | 211 | i_length_padded++; |
|---|
| | 212 | } |
|---|
| 205 | 213 | } |
|---|
| 206 | 214 | else |
|---|
| … | … | |
| 211 | 219 | if( i_fz > i_length + 8 ) |
|---|
| 212 | 220 | { |
|---|
| 213 | | p_filter->p_libvlc->pf_memset( p_out + 8 + i_length, 0, |
|---|
| 214 | | i_fz - i_length - 8 ); |
|---|
| | 221 | p_filter->p_libvlc->pf_memset( p_out + 8 + i_length_padded, 0, |
|---|
| | 222 | i_fz - i_length_padded - 8 ); |
|---|
| 215 | 223 | } |
|---|
| 216 | 224 | } |
|---|