Changeset e79dec9998d8c9520b276798f366d50fcaceb7e6
- Timestamp:
- 02/08/04 17:48:11
(5 years ago)
- Author:
- Gildas Bazin <gbazin@videolan.org>
- git-committer:
- Gildas Bazin <gbazin@videolan.org> 1076258891 +0000
- git-parent:
[ce491a51b8aa8b98fa77637aaf8baa839cc10625]
- git-author:
- Gildas Bazin <gbazin@videolan.org> 1076258891 +0000
- Message:
* modules/demux/dts.c: more fixes.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r7db8bcc |
re79dec9 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001 VideoLAN |
|---|
| 5 | | * $Id: dts.c,v 1.6 2004/02/06 15:11:39 hartman Exp $ |
|---|
| | 5 | * $Id: dts.c,v 1.7 2004/02/08 16:48:11 gbazin Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Gildas Bazin <gbazin@netcourrier.com> |
|---|
| … | … | |
| 122 | 122 | i_peek += GetDWLE( p_peek + i_peek - 4 ) + 8; |
|---|
| 123 | 123 | } |
|---|
| 124 | | |
|---|
| | 124 | |
|---|
| 125 | 125 | /* TODO: should check wave format and sample_rate */ |
|---|
| 126 | 126 | |
|---|
| 127 | 127 | /* Some DTS wav files don't begin with a sync code so we do a more |
|---|
| 128 | 128 | * extensive search */ |
|---|
| 129 | | if( input_Peek( p_input, &p_peek, i_peek + DTS_PACKET_SIZE ) == |
|---|
| 130 | | i_peek + DTS_PACKET_SIZE ) |
|---|
| 131 | | { |
|---|
| 132 | | int i_size = i_peek + DTS_PACKET_SIZE - DTS_MAX_HEADER_SIZE; |
|---|
| | 129 | if( input_Peek( p_input, &p_peek, i_peek + DTS_PACKET_SIZE * 2) == |
|---|
| | 130 | i_peek + DTS_PACKET_SIZE * 2) |
|---|
| | 131 | { |
|---|
| | 132 | int i_size = i_peek + DTS_PACKET_SIZE * 2 - DTS_MAX_HEADER_SIZE; |
|---|
| 133 | 133 | |
|---|
| 134 | 134 | while( i_peek < i_size ) |
|---|
| … | … | |
| 144 | 144 | |
|---|
| 145 | 145 | /* Have a peep at the show. */ |
|---|
| 146 | | if( input_Peek( p_input, &p_peek, i_peek + DTS_MAX_HEADER_SIZE ) < |
|---|
| 147 | | i_peek + DTS_MAX_HEADER_SIZE ) |
|---|
| | 146 | if( input_Peek( p_input, &p_peek, i_peek + DTS_MAX_HEADER_SIZE * 2 ) < |
|---|
| | 147 | i_peek + DTS_MAX_HEADER_SIZE * 2 ) |
|---|
| 148 | 148 | { |
|---|
| 149 | 149 | /* Stream too short */ |
|---|
| … | … | |
| 241 | 241 | |
|---|
| 242 | 242 | if( p_sys->b_start ) |
|---|
| 243 | | { |
|---|
| 244 | 243 | p_block_in->i_pts = p_block_in->i_dts = 1; |
|---|
| 245 | | p_sys->b_start = VLC_FALSE; |
|---|
| 246 | | } |
|---|
| 247 | 244 | else |
|---|
| 248 | | { |
|---|
| 249 | 245 | p_block_in->i_pts = p_block_in->i_dts = 0; |
|---|
| 250 | | } |
|---|
| 251 | 246 | |
|---|
| 252 | 247 | while( (p_block_out = p_sys->p_packetizer->pf_packetize( |
|---|
| 253 | 248 | p_sys->p_packetizer, &p_block_in )) ) |
|---|
| 254 | 249 | { |
|---|
| | 250 | p_sys->b_start = VLC_FALSE; |
|---|
| | 251 | |
|---|
| 255 | 252 | while( p_block_out ) |
|---|
| 256 | 253 | { |
|---|