]> git.sesse.net Git - vlc/commitdiff
Fixed demux_vaControlHelper GET_TIME implementation.
authorLaurent Aimar <fenrir@videolan.org>
Fri, 22 May 2009 19:30:16 +0000 (21:30 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Fri, 22 May 2009 19:30:16 +0000 (21:30 +0200)
It should return the current time even when the size isn't known.

src/input/demux.c

index 3d210ffe62c28dbbcaf05257cb29f46900f89528..4d983212f84ebcb8731dd693ad5c06e975a7122a 100644 (file)
@@ -234,7 +234,7 @@ int demux_vaControlHelper( stream_t *s,
 
         case DEMUX_GET_TIME:
             pi64 = (int64_t*)va_arg( args, int64_t * );
-            if( i_bitrate > 0 && i_end > i_start )
+            if( i_bitrate > 0 && i_tell >= i_start )
             {
                 *pi64 = INT64_C(8000000) * (i_tell - i_start) / i_bitrate;
                 return VLC_SUCCESS;