From da13f3e9c8b9077ed27a106e719918f16605bdea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tronel?= Date: Sat, 2 Dec 2023 20:57:59 +0100 Subject: [PATCH] Missing a float conversion. --- removeads.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/removeads.py b/removeads.py index 180c0b3..956e434 100755 --- a/removeads.py +++ b/removeads.py @@ -256,12 +256,13 @@ def getFramesInStream(inputFile, begin, end, streamKind, subStreamId=0): frames = frames['frames'] for frame in frames: if 'pts_time' in frame: - pts_time = frame['pts_time'] + pts_time = float(frame['pts_time']) elif 'pkt_pts_time' in frame: - pts_time = frame['pkt_pts_time'] + pts_time = float(frame['pkt_pts_time']) else: logger.error('Impossible to find timestamp of frame %s' % frame) return None + ts = timedelta(seconds=pts_time) if begin <= ts and ts <= end: res.append(frame)