Changeset 686e89e12858d03421426a82e8f25e371b640dce
- Timestamp:
- 18/10/07 21:36:06
(1 year ago)
- Author:
- Laurent Aimar <fenrir@videolan.org>
- git-committer:
- Laurent Aimar <fenrir@videolan.org> 1192736166 +0000
- git-parent:
[93bdb6e35c484e18f48307daeb5964c3df362b5b]
- git-author:
- Laurent Aimar <fenrir@videolan.org> 1192736166 +0000
- Message:
Fixed infinite loop.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r6dc378e |
r686e89e |
|
| 149 | 149 | int i_block; |
|---|
| 150 | 150 | block_t *pp_block[CC_MAX_REORDER_SIZE]; |
|---|
| 151 | | block_t *p_current; |
|---|
| 152 | 151 | |
|---|
| 153 | 152 | int i_field; |
|---|
| … | … | |
| 204 | 203 | memset( p_sys, 0, sizeof( *p_sys ) ); |
|---|
| 205 | 204 | p_sys->i_block = 0; |
|---|
| 206 | | p_sys->p_current = NULL; |
|---|
| 207 | 205 | |
|---|
| 208 | 206 | p_sys->i_field = i_field; |
|---|
| … | … | |
| 235 | 233 | for( ;; ) |
|---|
| 236 | 234 | { |
|---|
| 237 | | block_t *p_block; |
|---|
| 238 | | |
|---|
| 239 | | p_block = p_sys->p_current; |
|---|
| 240 | | if( !p_block ) |
|---|
| 241 | | p_block = Pop( p_dec ); |
|---|
| | 235 | block_t *p_block = Pop( p_dec ); |
|---|
| 242 | 236 | if( !p_block ) |
|---|
| 243 | 237 | break; |
|---|
| … | … | |
| 386 | 380 | vlc_bool_t b_changed = VLC_FALSE; |
|---|
| 387 | 381 | |
|---|
| 388 | | p_sys->p_current = p_block; |
|---|
| 389 | | |
|---|
| 390 | 382 | /* TODO do the real decoding here */ |
|---|
| 391 | | while( p_block && p_block->i_buffer >= 3 ) |
|---|
| | 383 | while( p_block->i_buffer >= 3 ) |
|---|
| 392 | 384 | { |
|---|
| 393 | 385 | if( p_block->p_buffer[0] == p_sys->i_field ) |
|---|
| … | … | |
| 396 | 388 | p_block->i_buffer -= 3; |
|---|
| 397 | 389 | p_block->p_buffer += 3; |
|---|
| 398 | | if( p_block->i_buffer <= 0 ) |
|---|
| 399 | | { |
|---|
| 400 | | block_Release( p_block ); |
|---|
| 401 | | p_sys->p_current = p_block = NULL; |
|---|
| 402 | | } |
|---|
| 403 | | } |
|---|
| | 390 | } |
|---|
| | 391 | if( p_block ) |
|---|
| | 392 | block_Release( p_block ); |
|---|
| | 393 | |
|---|
| 404 | 394 | static int64_t i_last = 0; |
|---|
| 405 | 395 | if( b_changed )//&& i_pts - i_last > 100*1000 ) |
|---|
| … | … | |
| 1092 | 1082 | if( h->i_channel != i_channel_selected ) |
|---|
| 1093 | 1083 | return VLC_FALSE; |
|---|
| | 1084 | //fprintf( stderr, "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC %x %x\n", data[0], data[1] ); |
|---|
| 1094 | 1085 | |
|---|
| 1095 | 1086 | if( d1 >= 0x10 ) |
|---|