[vlc-commits] es: missing check for I/O error

Rémi Denis-Courmont git at videolan.org
Thu Feb 5 21:40:59 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Feb  5 20:30:28 2015 +0200| [43abd14047dd897c302e63570541028f05f5ddce] | committer: Rémi Denis-Courmont

es: missing check for I/O error

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=43abd14047dd897c302e63570541028f05f5ddce
---

 modules/demux/mpeg/es.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c
index 85447d9..e99659a 100644
--- a/modules/demux/mpeg/es.c
+++ b/modules/demux/mpeg/es.c
@@ -445,8 +445,8 @@ static bool Parse( demux_t *p_demux, block_t **pp_output )
     {
         /* Make sure we are word aligned */
         int64_t i_pos = stream_Tell( p_demux->s );
-        if( i_pos % 2 )
-            stream_Read( p_demux->s, NULL, 1 );
+        if( (i_pos & 1) && stream_Read( p_demux->s, NULL, 1 ) != 1 )
+            return true;
     }
 
     p_block_in = stream_Block( p_demux->s, p_sys->i_packet_size );



More information about the vlc-commits mailing list