Skip to content

Commit

Permalink
Flip the order of the image check
Browse files Browse the repository at this point in the history
This allows for the stream to use the image resolution in the case that we are using an audio file with a background image.
  • Loading branch information
anivegesana authored and scivision committed Mar 6, 2023
1 parent 89f409d commit 23285ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pylivestream/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ def osparam(self, fn: Path) -> None:
self.fps = C.get("screencap_fps")
self.origin: list[str] = C.get("screencap_origin", [1, 1])
self.movingimage = self.staticimage = False
elif self.image: # audio-only stream + background image
self.res = utils.get_resolution(self.image, self.probeexe)
self.fps = utils.get_framerate(self.infn, self.probeexe)
elif self.vidsource == "file": # streaming video from a file
self.res = utils.get_resolution(self.infn, self.probeexe)
self.fps = utils.get_framerate(self.infn, self.probeexe)
elif self.vidsource is None and self.image: # audio-only stream + background image
self.res = utils.get_resolution(self.image, self.probeexe)
self.fps = utils.get_framerate(self.infn, self.probeexe)
else: # audio-only
self.res = None
self.fps = None
Expand Down

0 comments on commit 23285ba

Please sign in to comment.