[vlc-commits] demux: avi: Ignore empty idx1 indexes for testing offset (fix #9248)
Francois Cartegnie
git at videolan.org
Mon Aug 26 10:50:19 CEST 2013
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Aug 26 10:49:38 2013 +0200| [08c5317937900b5176d4abcc34aef66acc4d0421] | committer: Francois Cartegnie
demux: avi: Ignore empty idx1 indexes for testing offset (fix #9248)
More broken avi files :/
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=08c5317937900b5176d4abcc34aef66acc4d0421
---
modules/demux/avi/avi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 46ddd95..8d1fca3 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -2140,7 +2140,10 @@ static int AVI_IndexFind_idx1( demux_t *p_demux,
avi_chunk_list_t *p_movi = AVI_ChunkFind( p_riff, AVIFOURCC_movi, 0);
uint64_t i_first_pos = UINT64_MAX;
for( unsigned i = 0; i < __MIN( p_idx1->i_entry_count, 100 ); i++ )
- i_first_pos = __MIN( i_first_pos, p_idx1->entry[i].i_pos );
+ {
+ if ( p_idx1->entry[i].i_length > 0 )
+ i_first_pos = __MIN( i_first_pos, p_idx1->entry[i].i_pos );
+ }
const uint64_t i_movi_content = p_movi->i_chunk_pos + 8;
if( i_first_pos < i_movi_content )
More information about the vlc-commits
mailing list