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 3d210ff..4d98321 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;