Changeset ac217da0399df26771fec3005f4faaa65a2eb34b
- Timestamp:
- 07/03/08 22:51:05
(2 months ago)
- Author:
- Laurent Aimar <fenrir@videolan.org>
- git-committer:
- Laurent Aimar <fenrir@videolan.org> 1215118265 +0000
- git-parent:
[58766eae93336caaf0113e76900900a7a274bd05]
- git-author:
- Laurent Aimar <fenrir@videolan.org> 1215118184 +0000
- Message:
Fixed AStreamSeekBlock. When skipping data, the position may not be the
requested one. (Breaking at least mapped file input).
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rfd2c554 |
rac217da |
|
| 996 | 996 | else |
|---|
| 997 | 997 | { |
|---|
| 998 | | /* Read enough data */ |
|---|
| 999 | | while( p_sys->block.i_start + p_sys->block.i_size < i_pos ) |
|---|
| 1000 | | { |
|---|
| | 998 | do |
|---|
| | 999 | { |
|---|
| | 1000 | /* Read and skip enough data */ |
|---|
| 1001 | 1001 | if( AStreamRefillBlock( s ) ) |
|---|
| 1002 | 1002 | return VLC_EGENERIC; |
|---|
| 1003 | 1003 | |
|---|
| 1004 | 1004 | while( p_sys->block.p_current && |
|---|
| 1005 | | p_sys->i_pos + p_sys->block.p_current->i_buffer < i_pos ) |
|---|
| | 1005 | p_sys->i_pos + p_sys->block.p_current->i_buffer - p_sys->block.i_offset < i_pos ) |
|---|
| 1006 | 1006 | { |
|---|
| 1007 | | p_sys->i_pos += p_sys->block.p_current->i_buffer; |
|---|
| | 1007 | p_sys->i_pos += p_sys->block.p_current->i_buffer - p_sys->block.i_offset; |
|---|
| 1008 | 1008 | p_sys->block.p_current = p_sys->block.p_current->p_next; |
|---|
| | 1009 | p_sys->block.i_offset = 0; |
|---|
| 1009 | 1010 | } |
|---|
| 1010 | 1011 | } |
|---|
| | 1012 | while( p_sys->block.i_start + p_sys->block.i_size < i_pos ); |
|---|
| 1011 | 1013 | |
|---|
| 1012 | 1014 | p_sys->block.i_offset = i_pos - p_sys->i_pos; |
|---|