vlc/vlc-2.2 | branch: master | Francois Cartegnie <[email protected]> | Sat Jul 19 01:11:25 2014 +0900| [db77791b381bf1ad88e620e5229eae96edf31a6e] | committer: Jean-Baptiste Kempf
demux: avi: don't allow SET_TIME on non seekable (cherry picked from commit fd4937f70d6ed2cbd1b05ee6d8f7807618fd7fe1) Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=db77791b381bf1ad88e620e5229eae96edf31a6e --- modules/demux/avi/avi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c index b468bb1..86e042d 100644 --- a/modules/demux/avi/avi.c +++ b/modules/demux/avi/avi.c @@ -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); } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
