[vlc-commits] demux: avi: proper reparent on zero sized chunk
Francois Cartegnie
git at videolan.org
Thu Jul 20 18:52:31 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jul 20 17:29:28 2017 +0200| [db053fc90a2dfc9a4dcc699858db64116833a780] | committer: Francois Cartegnie
demux: avi: proper reparent on zero sized chunk
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=db053fc90a2dfc9a4dcc699858db64116833a780
---
modules/demux/avi/libavi.c | 9 +++++----
modules/demux/avi/libavi.h | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/modules/demux/avi/libavi.c b/modules/demux/avi/libavi.c
index 467955b378..6c50d54bcd 100644
--- a/modules/demux/avi/libavi.c
+++ b/modules/demux/avi/libavi.c
@@ -540,7 +540,7 @@ static int AVI_ChunkRead_strd( stream_t *s, avi_chunk_t *p_chk )
if ( p_chk->common.i_chunk_size == 0 )
{
msg_Dbg( (vlc_object_t*)s, "Zero sized pre-JUNK section met" );
- return AVI_STRD_ZERO_CHUNK;
+ return AVI_ZEROSIZED_CHUNK;
}
AVI_READCHUNK_ENTER;
@@ -950,10 +950,11 @@ int AVI_ChunkRead( stream_t *s, avi_chunk_t *p_chk, avi_chunk_t *p_father )
if( AVI_Chunk_Function[i_index].AVI_ChunkRead_function )
{
int i_return = AVI_Chunk_Function[i_index].AVI_ChunkRead_function( s, p_chk );
- if ( i_return == AVI_STRD_ZERO_CHUNK || i_return == AVI_ZERO_FOURCC )
+ if ( i_return == AVI_ZEROSIZED_CHUNK || i_return == AVI_ZERO_FOURCC )
{
- if ( !p_father ) return VLC_EGENERIC;
- return AVI_NextChunk( s, p_father );
+ if ( !p_father )
+ return VLC_EGENERIC;
+ return AVI_NextChunk( s, ( i_return == AVI_ZEROSIZED_CHUNK ) ? p_chk : p_father );
}
return i_return;
}
diff --git a/modules/demux/avi/libavi.h b/modules/demux/avi/libavi.h
index 64965f9c3d..deccfb2aa8 100644
--- a/modules/demux/avi/libavi.h
+++ b/modules/demux/avi/libavi.h
@@ -178,7 +178,7 @@ typedef struct avi_chunk_dmlh_s
uint32_t dwTotalFrames;
} avi_chunk_dmlh_t;
-#define AVI_STRD_ZERO_CHUNK 0xFF
+#define AVI_ZEROSIZED_CHUNK 0xFF
#define AVI_ZERO_FOURCC 0xFE
#define AVI_INDEX_OF_INDEXES 0x00
More information about the vlc-commits
mailing list