[vlc-devel] commit: Do not try to seeking beyond the end of stream in mmstu. ( Laurent Aimar )

git version control git at videolan.org
Mon May 4 21:02:56 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon May  4 21:00:06 2009 +0200| [a2376bde2ddf38eb435261102c285c61ab064e63] | committer: Laurent Aimar 

Do not try to seeking beyond the end of stream in mmstu.

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

 modules/access/mms/mmstu.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/access/mms/mmstu.c b/modules/access/mms/mmstu.c
index f0010a7..1ae4b90 100644
--- a/modules/access/mms/mmstu.c
+++ b/modules/access/mms/mmstu.c
@@ -362,6 +362,9 @@ static int Seek( access_t * p_access, int64_t i_pos )
         i_packet = ( i_pos - p_sys->i_header ) / p_sys->i_packet_length;
         i_offset = ( i_pos - p_sys->i_header ) % p_sys->i_packet_length;
     }
+    if( p_sys->b_seekable && i_packet >= p_sys->i_packet_count )
+        return VLC_EGENERIC;
+
     msg_Dbg( p_access, "seeking to %"PRId64 " (packet:%d)", i_pos, i_packet );
 
     MMSStop( p_access );




More information about the vlc-devel mailing list