]> git.sesse.net Git - vlc/commitdiff
Do not try to seeking beyond the end of stream in mmstu.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 4 May 2009 19:00:06 +0000 (21:00 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 4 May 2009 19:02:04 +0000 (21:02 +0200)
modules/access/mms/mmstu.c

index f0010a75ecef2f079aacf399e34a27266fea7dd5..1ae4b90c551806bbd21b897bafc02d0d1ced4369 100644 (file)
@@ -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 );