Fix FFmpegExaminer termination condition when there is no video;
authorCarl Hetherington <cth@carlh.net>
Sat, 1 Oct 2022 10:05:33 +0000 (12:05 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 16 Oct 2023 09:35:33 +0000 (11:35 +0200)
it's hard to see how this ever worked.

src/lib/ffmpeg_examiner.cc

index cd609d0b1122c4e0e6ba2e6d4bea49eb9e1c8d12..0a4838956bab6187fcf4c905b5363be4604db64d 100644 (file)
@@ -153,7 +153,7 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo
 
                av_packet_free (&packet);
 
-               if (_first_video && got_all_audio && temporal_reference.size() >= (PULLDOWN_CHECK_FRAMES * 2)) {
+               if (got_all_audio && (!_video_stream || (_first_video && temporal_reference.size() >= (PULLDOWN_CHECK_FRAMES * 2)))) {
                        /* All done */
                        break;
                }