Skip to content

Commit

Permalink
Improve typing in converter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Mar 9, 2024
1 parent 603c194 commit 709ad34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sticker_convert/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ def _frames_export_pil(self) -> None:
def _frames_export_pyav(self) -> None:
import av # type: ignore
from av.container import OutputContainer # type: ignore
from av.video.stream import VideoStream

options = {}

Expand Down Expand Up @@ -665,6 +666,8 @@ def _frames_export_pyav(self) -> None:
) as output:
output = cast(OutputContainer, output) # type: ignore
out_stream = output.add_stream(codec, rate=self.fps, options=options) # type: ignore
out_stream = cast(VideoStream, out_stream)
assert isinstance(self.res_w, int) and isinstance(self.res_h, int)
out_stream.width = self.res_w
out_stream.height = self.res_h
out_stream.pix_fmt = pixel_format
Expand Down

0 comments on commit 709ad34

Please sign in to comment.