[vlc-devel] [PATCH] mpeg-ts: check stream_Seek() result

Petri Hintukainen phintuka at gmail.com
Fri Dec 11 13:53:59 CET 2015


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

diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 549303c..83a2551 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -2978,7 +2978,8 @@ static int ProbeStart( demux_t *p_demux, int i_program )
         i_probe_count += PROBE_CHUNK_COUNT;
     } while( i_pos > 0 && (i_pcr == -1 || !b_found) && i_probe_count < (2 * PROBE_CHUNK_COUNT) );
 
-    stream_Seek( p_sys->stream, i_initial_pos );
+    if( stream_Seek( p_sys->stream, i_initial_pos ) )
+        return VLC_EGENERIC;
 
     return (b_found) ? VLC_SUCCESS : VLC_EGENERIC;
 }
@@ -3008,7 +3009,8 @@ static int ProbeEnd( demux_t *p_demux, int i_program )
         i_probe_count += PROBE_CHUNK_COUNT;
     } while( i_pos > 0 && (i_pcr == -1 || !b_found) && i_probe_count < (6 * PROBE_CHUNK_COUNT) );
 
-    stream_Seek( p_sys->stream, i_initial_pos );
+    if( stream_Seek( p_sys->stream, i_initial_pos ) )
+        return VLC_EGENERIC;
 
     return (b_found) ? VLC_SUCCESS : VLC_EGENERIC;
 }
-- 
2.5.0



More information about the vlc-devel mailing list