[vlc-commits] TS: Check stream_Read() result
Petri Hintukainen
git at videolan.org
Sun Oct 18 23:13:54 CEST 2015
vlc | branch: master | Petri Hintukainen <phintuka at gmail.com> | Fri Oct 16 21:28:14 2015 +0300| [656963c731a896e4cc8a818327e1927d48dd01e9] | committer: Jean-Baptiste Kempf
TS: Check stream_Read() result
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=656963c731a896e4cc8a818327e1927d48dd01e9
---
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 0f57c3e..3bdbdb1 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 )
{
More information about the vlc-commits
mailing list