[vlc-devel] [PATCH] Check stream_Read() result
Petri Hintukainen
phintuka at gmail.com
Fri Oct 16 20:28:14 CEST 2015
---
modules/demux/mpeg/ts.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 21bedd3..d5fd5cc 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -2559,7 +2559,8 @@ static block_t* ReadTSPacket( demux_t *p_demux )
i_skip++;
}
msg_Dbg( p_demux, "skipping %d bytes of garbage", i_skip );
- stream_Read( p_sys->stream, NULL, i_skip );
+ if (stream_Read( p_sys->stream, NULL, i_skip ) != i_skip)
+ return NULL;
if( i_skip < i_peek - p_sys->i_packet_size )
{
--
2.1.4
More information about the vlc-devel
mailing list