]> git.sesse.net Git - vlc/commitdiff
Allow seeking of character devices with non-zero size
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 29 Oct 2006 16:29:07 +0000 (16:29 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 29 Oct 2006 16:29:07 +0000 (16:29 +0000)
modules/access/file.c

index 8ffce0f7375ca02c533ab40367c1885c33f97bef..7573646473bf224c55f2cef1aa5ee0695def6299 100644 (file)
@@ -227,7 +227,8 @@ static int Open( vlc_object_t *p_this )
             p_sys->b_seekable = VLC_TRUE;
         }
 #elif defined( HAVE_SYS_STAT_H )
-        else if( S_ISREG(stat_info.st_mode) || S_ISBLK(stat_info.st_mode) )
+        else if( S_ISREG(stat_info.st_mode) || S_ISBLK(stat_info.st_mode)
+        || ( S_ISCHR(stat_info.st_mode) && (stat_info.st_size > 0) ) )
         {
             p_sys->b_seekable = VLC_TRUE;
             p_access->info.i_size = stat_info.st_size;