[vlc-commits] demux: mp4: really exit on truncated data
Francois Cartegnie
git at videolan.org
Tue Jan 9 09:44:09 CET 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jan 9 09:40:49 2018 +0100| [068c9e7ddaca765ea4794cba911bac219b51cc73] | committer: Francois Cartegnie
demux: mp4: really exit on truncated data
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=068c9e7ddaca765ea4794cba911bac219b51cc73
---
modules/demux/mp4/mp4.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index ee984fb764..26867fc90a 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -128,6 +128,7 @@ struct demux_sys_t
#define DEMUX_TRACK_MAX_PRELOAD (CLOCK_FREQ * 15) /* maximum preloading, to deal with interleaving */
#define VLC_DEMUXER_EOS (VLC_DEMUXER_EGENERIC - 1)
+#define VLC_DEMUXER_FATAL (VLC_DEMUXER_EGENERIC - 2)
const uint32_t rgi_pict_atoms[2] = { ATOM_PICT, ATOM_pict };
const char *psz_meta_roots[] = { "/moov/udta/meta/ilst",
@@ -4343,7 +4344,7 @@ static int FragDemuxTrack( demux_t *p_demux, mp4_track_t *p_track,
{
if( p_block )
block_Release( p_block );
- return VLC_DEMUXER_EOF;
+ return VLC_DEMUXER_FATAL;
}
#if 0
@@ -4445,6 +4446,8 @@ static int DemuxMoof( demux_t *p_demux )
if( i_ret == VLC_DEMUXER_SUCCESS )
i_status = VLC_DEMUXER_SUCCESS;
+ else if( i_ret == VLC_DEMUXER_FATAL )
+ i_status = VLC_DEMUXER_EOF;
}
if( i_status != VLC_DEMUXER_SUCCESS || !tk )
More information about the vlc-commits
mailing list