diff mbox series

[FFmpeg-devel,15/18] ffmpeg: stop using non-public AVStream fields

Message ID 20201009130430.602-15-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,01/18] lavf: move AVStream.info to AVStreamInternal | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Anton Khirnov Oct. 9, 2020, 1:04 p.m. UTC
This effectively reverts ae2cb9290ac and 52c5521877a.
---
 fftools/ffmpeg_opt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Michael Niedermayer Oct. 9, 2020, 6:24 p.m. UTC | #1
On Fri, Oct 09, 2020 at 03:04:27PM +0200, Anton Khirnov wrote:
> This effectively reverts ae2cb9290ac and 52c5521877a.
> ---
>  fftools/ffmpeg_opt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

breaks:
./ffmpeg -ss 2:16 -i ~/tickets/2687/Thailand-Wave.wmv last2sec-of-source.asf 

with the patch the video stream is empty

i suspect that is the input file:
http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2639/Thailand-Wave.wmv

[...]
diff mbox series

Patch

diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 19f719e3ff..a5c92bf461 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -2215,7 +2215,7 @@  static int open_output_file(OptionsContext *o, const char *filename)
             for (i = 0; i < nb_input_streams; i++) {
                 int new_area;
                 ist = input_streams[i];
-                new_area = ist->st->codecpar->width * ist->st->codecpar->height + 100000000*!!ist->st->codec_info_nb_frames
+                new_area = ist->st->codecpar->width * ist->st->codecpar->height
                            + 5000000*!!(ist->st->disposition & AV_DISPOSITION_DEFAULT);
                 if (ist->user_set_discard == AVDISCARD_ALL)
                     continue;
@@ -2239,7 +2239,7 @@  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->channels + 100000000*!!ist->st->codec_info_nb_frames
+                score = ist->st->codecpar->channels
                         + 5000000*!!(ist->st->disposition & AV_DISPOSITION_DEFAULT);
                 if (ist->user_set_discard == AVDISCARD_ALL)
                     continue;