From 9a69753ef87450a6ee006204e8c9490470fcfdaa Mon Sep 17 00:00:00 2001 From: laggykiller Date: Thu, 30 May 2024 22:54:24 +0800 Subject: [PATCH] Fix fps being returned as Fraction instead of float in `_get_file_fps_frames_duration_pillow()` --- src/sticker_convert/utils/media/codec_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sticker_convert/utils/media/codec_info.py b/src/sticker_convert/utils/media/codec_info.py index e50f844..cd43f34 100755 --- a/src/sticker_convert/utils/media/codec_info.py +++ b/src/sticker_convert/utils/media/codec_info.py @@ -257,7 +257,7 @@ def _get_file_fps_frames_duration_pillow( else: duration_gcd = durations_gcd(*durations) frames_apparent = total_duration / duration_gcd - fps = frames_apparent / total_duration * 1000 + fps = float(frames_apparent / total_duration * 1000) return fps, frames, total_duration return 0.0, 1, 0