]> git.sesse.net Git - ffmpeg/commitdiff
ffmpeg.c: stop accessing private AVStream.codec_info_nb_frames
authorAnton Khirnov <anton@khirnov.net>
Sun, 25 Oct 2020 14:50:55 +0000 (15:50 +0100)
committerAnton Khirnov <anton@khirnov.net>
Wed, 28 Oct 2020 12:58:32 +0000 (13:58 +0100)
Use AVSTREAM_EVENT_FLAG_NEW_PACKETS instead, which should provide the
same information in this case.

fftools/ffmpeg_opt.c

index a0d1b06f2df8f6bd5c636ca9628281d3cb9af202..d58462b6aece55f4cf194e30b4fdff209742cd4b 100644 (file)
@@ -2215,7 +2215,8 @@ static int open_output_file(OptionsContext *o, const char *filename)
             for (i = 0; i < nb_input_streams; i++) {
                 int score;
                 ist = input_streams[i];
-                score = ist->st->codecpar->width * ist->st->codecpar->height + 100000000*!!ist->st->codec_info_nb_frames
+                score = ist->st->codecpar->width * ist->st->codecpar->height
+                           + 100000000 * !!(ist->st->event_flags & AVSTREAM_EVENT_FLAG_NEW_PACKETS)
                            + 5000000*!!(ist->st->disposition & AV_DISPOSITION_DEFAULT);
                 if (ist->user_set_discard == AVDISCARD_ALL)
                     continue;