Skip to content

Commit ccdddb7

Browse files
author
blank_name
committed
Guard against nil video-dec-params before trying to access video dimensions.
1 parent 1b67e22 commit ccdddb7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/thumbnailer_shared.lua

+5
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ end
146146

147147
function Thumbnailer:get_thumbnail_size()
148148
local video_dec_params = mp.get_property_native("video-dec-params")
149+
-- Guard against nil video_dec_params before trying to access dimensions
150+
if video_dec_params == nil then
151+
return nil
152+
end
153+
149154
local video_width = video_dec_params.dw
150155
local video_height = video_dec_params.dh
151156
if not (video_width and video_height) then

0 commit comments

Comments
 (0)