Changeset 101d58fdc449a6ed7b1924b9c83881f762263a30
- Timestamp:
- 19/01/08 20:58:45
(9 months ago)
- Author:
- Pavlov Konstantin <thresh@videolan.org>
- git-committer:
- Pavlov Konstantin <thresh@videolan.org> 1200772725 +0000
- git-parent:
[42ca90b53c010df7346bab61975e52de30184223]
- git-author:
- Pavlov Konstantin <thresh@videolan.org> 1200772725 +0000
- Message:
Move appropriate code to DEMUX_GET_LENGTH and destroy saved args when done.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r99180b0 |
r101d58f |
|
| 339 | 339 | |
|---|
| 340 | 340 | va_copy ( args_save, args ); |
|---|
| 341 | | va_end ( args_save ); |
|---|
| 342 | 341 | |
|---|
| 343 | 342 | switch( i_query ) |
|---|
| … | … | |
| 357 | 356 | * needed for multi-input */ |
|---|
| 358 | 357 | |
|---|
| 359 | | default: |
|---|
| | 358 | case DEMUX_GET_LENGTH: |
|---|
| 360 | 359 | i_ret = demux2_vaControlHelper( p_demux->s, 0, -1, |
|---|
| 361 | 360 | p_sys->i_bitrate_avg, 1, i_query, |
|---|
| … | … | |
| 363 | 362 | /* No bitrate, we can't have it precisely, but we can compute |
|---|
| 364 | 363 | * a raw approximation with time/position */ |
|---|
| 365 | | if( i_ret && i_query == DEMUX_GET_LENGTH &&!p_sys->i_bitrate_avg ) |
|---|
| | 364 | if( i_ret && !p_sys->i_bitrate_avg ) |
|---|
| 366 | 365 | { |
|---|
| 367 | 366 | float f_pos = (double)(uint64_t)( stream_Tell( p_demux->s ) ) / |
|---|
| … | … | |
| 377 | 376 | return VLC_SUCCESS; |
|---|
| 378 | 377 | } |
|---|
| | 378 | va_end( args_save ); |
|---|
| | 379 | return i_ret; |
|---|
| | 380 | |
|---|
| | 381 | default: |
|---|
| | 382 | i_ret = demux2_vaControlHelper( p_demux->s, 0, -1, |
|---|
| | 383 | p_sys->i_bitrate_avg, 1, i_query, |
|---|
| | 384 | args ); |
|---|
| 379 | 385 | if( !i_ret && p_sys->i_bitrate_avg > 0 && |
|---|
| 380 | 386 | (i_query == DEMUX_SET_POSITION || i_query == DEMUX_SET_TIME) ) |
|---|