[pp:ugoira] fix "KeyError: '_ugoira_frame_index'" (#6154)

fixes regression introduced in 07bd967f

Files with a non-ugoira related 'frames' metadata field would cause an
exception when an ugoira post processor was active.
This commit is contained in:
Mike Fährmann
2024-09-06 21:29:12 +02:00
parent 11a508f470
commit 061cc12fdd

View File

@@ -109,8 +109,11 @@ class UgoiraPP(PostProcessor):
pathfmt.set_extension(self.extension)
pathfmt.build_path()
else:
index = pathfmt.kwdict.get("_ugoira_frame_index")
if index is None:
return
pathfmt.build_path()
index = pathfmt.kwdict["_ugoira_frame_index"]
frame = self._frames[index].copy()
frame["index"] = index
frame["path"] = pathfmt.realpath