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 )
msg_Dbg (p_access, "ignoring directory");
goto error;
}
p_access->info.i_size = st.st_size;
if (!S_ISREG (st.st_mode))
if (S_ISREG (st.st_mode))
p_access->info.i_size = st.st_size;
else if (!S_ISBLK (st.st_mode))
p_sys->b_seekable = false;
#else
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