]> git.sesse.net Git - vlc/commitdiff
demux: avi: don't allow SET_TIME on non seekable
authorFrancois Cartegnie <fcvlcdev@free.fr>
Fri, 18 Jul 2014 16:11:25 +0000 (01:11 +0900)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 23 Jul 2014 01:59:42 +0000 (10:59 +0900)
modules/demux/avi/avi.c

index b468bb190639b1e2e570d9dce8ed927aad42d8df..86e042d446a71b337d6dc28ce75e4828b56fba3b 100644 (file)
@@ -1604,7 +1604,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             int i_percent = 0;
 
             i64 = (int64_t)va_arg( args, int64_t );
-            if( p_sys->i_length > 0 )
+            if( !p_sys->b_seekable )
+            {
+                return VLC_EGENERIC;
+            }
+            else if( p_sys->i_length > 0 )
             {
                 i_percent = 100 * i64 / (p_sys->i_length*1000000);
             }