[vlc-commits] voc: fix skipping of unknown headers (fixes #6437)
Rémi Denis-Courmont
git at videolan.org
Wed Mar 21 18:21:37 CET 2012
vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Mar 21 19:08:53 2012 +0200| [0118ec301403c0a2db13326760715a3f61900358] | committer: Rémi Denis-Courmont
voc: fix skipping of unknown headers (fixes #6437)
(cherry picked from commit ea068351d3991a1b330eb67fb13ddbb90943e659)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=0118ec301403c0a2db13326760715a3f61900358
---
modules/demux/voc.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/modules/demux/voc.c b/modules/demux/voc.c
index 3cf8887..2f0d683 100644
--- a/modules/demux/voc.c
+++ b/modules/demux/voc.c
@@ -424,17 +424,18 @@ static int Demux( demux_t *p_demux )
{
demux_sys_t *p_sys = p_demux->p_sys;
block_t *p_block;
- int64_t i_offset, i;
-
- i_offset = stream_Tell( p_demux->s );
-
- while( ( i_offset >= p_sys->i_block_end )
- && ( p_sys->i_silence_countdown == 0 ) )
- if( ReadBlockHeader( p_demux ) != VLC_SUCCESS )
- return 0;
+ int64_t i;
if( p_sys->i_silence_countdown == 0 )
{
+ int64_t i_offset = stream_Tell( p_demux->s );
+ if( i_offset >= p_sys->i_block_end )
+ {
+ if( ReadBlockHeader( p_demux ) != VLC_SUCCESS )
+ return 0;
+ return 1;
+ }
+
i = ( p_sys->i_block_end - i_offset )
/ p_sys->fmt.audio.i_bytes_per_frame;
if( i > SAMPLES_BUFFER )
More information about the vlc-commits
mailing list