Fix examination logic. v2.16.97
authorCarl Hetherington <cth@carlh.net>
Sat, 9 Nov 2024 11:55:41 +0000 (12:55 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 10 Nov 2024 01:38:49 +0000 (02:38 +0100)
Before we would stop if there was one audio stream and the first packet
was from that stream; we would not carry on to find the video.

src/lib/ffmpeg_examiner.cc

index 5353ddd2bc79915b16e845e1bcda3e000fcc12af..f5610f50271fc97d5ff3d51ae43f607ef397b67f 100644 (file)
@@ -119,8 +119,8 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo
         * and a string seems a reasonably neat way to do that.
         */
        string temporal_reference;
-       bool carry_on_video = false;
-       std::vector<bool> carry_on_audio(_audio_streams.size());
+       bool carry_on_video = has_video();
+       std::vector<bool> carry_on_audio(_audio_streams.size(), true);
        while (true) {
                auto packet = av_packet_alloc ();
                DCPOMATIC_ASSERT (packet);