Stop crashing when running the hints check on films with silent/black gaps.
authorCarl Hetherington <cth@carlh.net>
Mon, 9 Sep 2019 00:18:54 +0000 (01:18 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 9 Sep 2019 00:18:54 +0000 (01:18 +0100)
src/lib/player.cc

index 23fe65c..fd9ffb9 100644 (file)
@@ -614,12 +614,12 @@ Player::pass ()
                which = CONTENT;
        }
 
-       if (!_black.done() && (!earliest_time || _black.position() < *earliest_time)) {
+       if (!_black.done() && !_ignore_video && (!earliest_time || _black.position() < *earliest_time)) {
                earliest_time = _black.position ();
                which = BLACK;
        }
 
-       if (!_silent.done() && (!earliest_time || _silent.position() < *earliest_time)) {
+       if (!_silent.done() && !_ignore_audio && (!earliest_time || _silent.position() < *earliest_time)) {
                earliest_time = _silent.position ();
                which = SILENT;
        }