[vlc-commits] demux: avi: workaround broken RIFF header values
Francois Cartegnie
git at videolan.org
Thu Jan 4 13:26:36 CET 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jan 4 13:14:34 2018 +0100| [50c43317275c7551935dbae934bb2d25d6d67138] | committer: Francois Cartegnie
demux: avi: workaround broken RIFF header values
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=50c43317275c7551935dbae934bb2d25d6d67138
---
modules/demux/avi/libavi.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/demux/avi/libavi.c b/modules/demux/avi/libavi.c
index fca5b32a6e..6b04dfb93e 100644
--- a/modules/demux/avi/libavi.c
+++ b/modules/demux/avi/libavi.c
@@ -89,7 +89,12 @@ static int AVI_ChunkReadCommon( stream_t *s, avi_chunk_t *p_chk,
{
msg_Warn( s, "chunk %4.4s does not fit into parent %ld",
(char*)&p_chk->common.i_chunk_fourcc, AVI_ChunkEnd( p_father ) );
- return VLC_EGENERIC;
+
+ /* How hard is to produce files with the correct declared size ? */
+ if( p_father->common.i_chunk_fourcc != AVIFOURCC_RIFF ||
+ p_father->common.p_father == NULL ||
+ p_father->common.p_father->common.p_father != NULL ) /* Root > RIFF only */
+ return VLC_EGENERIC;
}
#ifdef AVI_DEBUG
More information about the vlc-commits
mailing list