Commit 9d4c2ee5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Only use file size for regular files. Allow seeking block devices.

Block special files are always seekable. File size is undefined for
non-regular files.
parent be6cfb05
...@@ -166,9 +166,9 @@ static int Open( vlc_object_t *p_this ) ...@@ -166,9 +166,9 @@ static int Open( vlc_object_t *p_this )
msg_Dbg (p_access, "ignoring directory"); msg_Dbg (p_access, "ignoring directory");
goto error; goto error;
} }
if (S_ISREG (st.st_mode))
p_access->info.i_size = st.st_size; p_access->info.i_size = st.st_size;
if (!S_ISREG (st.st_mode)) else if (!S_ISBLK (st.st_mode))
p_sys->b_seekable = false; p_sys->b_seekable = false;
#else #else
p_sys->b_seekable = !b_stdin; p_sys->b_seekable = !b_stdin;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment