Skip to content

Commit

Permalink
pts_time might not be there in keyframes
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaserlang committed Nov 17, 2023
1 parent 9da4081 commit 60eaa8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion seplis_play_server/scanners/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async def get_keyframes(self, path):
if isinstance(data, bytes):
data = data.decode('utf-8')
data = utils.json_loads(data)
keyframes = [r['pts_time'] for r in data['packets'] if r['flags'].startswith('K')]
keyframes = [r['pts_time'] for r in data['packets'] if r['flags'].startswith('K') and r.get('pts_time')]
return keyframes


Expand Down

0 comments on commit 60eaa8d

Please sign in to comment.