Skip to content

Commit 64f1bae

Browse files
committed
[scene_manager] Fix incorrect frame check #455
We cannot check if the frame is boolean due to ambiguity, so we must test both cases. #454 #455
1 parent 3fb8d8a commit 64f1bae

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

scenedetect/scene_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ def save_images(
541541
for j, image_timecode in enumerate(scene_timecodes):
542542
video.seek(image_timecode)
543543
frame_im = video.read()
544-
if frame_im is not None:
544+
if frame_im is not None and frame_im is not False:
545545
# TODO: Add extension to template.
546546
# TODO: Allow NUM to be a valid suffix in addition to NUMBER.
547547
file_path = "%s.%s" % (

website/pages/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ Development
584584
## PySceneDetect 0.6.5 (TBD)
585585

586586
- [bugfix] Fix new detectors not working with `default-detector` config option
587+
- [bugfix] Fix crash when using `save-images` with OpenCV backend [#455](https://github.com/Breakthrough/PySceneDetect/issues/455)
587588
- [bugfix] Fix `SyntaxWarning` due to incorrect escaping [#400](https://github.com/Breakthrough/PySceneDetect/issues/400)
588589
- [bugfix] Fix `ContentDetector` crash when using callbacks [#416](https://github.com/Breakthrough/PySceneDetect/issues/416) [#420](https://github.com/Breakthrough/PySceneDetect/issues/420)
589590
- [general] Timecodes of the form `MM:SS[.nnn]` are now processed correctly [#443](https://github.com/Breakthrough/PySceneDetect/issues/443)

0 commit comments

Comments
 (0)