Commit 7e88d581 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

VLSub: Display a user visible error when failing to generate the hash

parent dff8182b
......@@ -1307,10 +1307,12 @@ openSub = {
data_start = file:read(chunk_size)
if not size then
vlc.msg.warn("[VLSub] Failed to get stream size")
setError(lang["mess_err_hash"])
return false
end
if not file:seek( size - chunk_size ) then
vlc.msg.warn("[VLSub] Failed to seek to the end of the stream")
setError(lang["mess_err_hash"])
return false
end
data_end = file:read(chunk_size)
......
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