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 23fe65cf4c8fcfd9448975d1b050edc7f787c8cb..fd9ffb9ed4f65cb23e27affa79001e9fd7317609 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;
        }