On Wed, Dec 15, 2021 at 08:36:25PM +0100, Anton Khirnov wrote: > Quoting Michael Niedermayer (2021-12-14 22:13:43) > > On Mon, Dec 13, 2021 at 04:20:41PM +0100, Anton Khirnov wrote: > > > It features in limiting the number of output frames (-frames option) and > > > currently can be incremented from two places: > > > - for video encoding (not streamcopy), in do_video_out() after each > > > successful avcodec_send_frame() call > > > - for all other cases, in of_submit_packet() > > > > > > Not only is this inconsistent and confusing, but also the special > > > treatment for video encoding is redundant, since > > > AVCodecContext.frame_count stores the exact same value (number of > > > successful avcodec_send_frame()) calls. > > > > > > Replace the use of OutputStream.frame_count in do_video_out() with > > > AVCodecContext.frame_count. Modify OutputStream.frame_count in the same > > > way for all streams. > > > --- > > > fftools/ffmpeg.c | 9 ++++----- > > > fftools/ffmpeg_mux.c | 19 +++++++------------ > > > 2 files changed, 11 insertions(+), 17 deletions(-) > > > > This results in differences > > one is: > > ./ffmpeg -i ~/tickets/4072/CoP\ 1\ 1\ 3\ -M.avi -vframes 2 -bitexact -vcodec huffyuv /tmp/4072-fic-old.avi > > > > -rw-r----- 1 michael michael 3572792 Dez 14 22:09 /tmp/4072-fic-new.avi > > -rw-r----- 1 michael michael 1908172 Dez 14 22:10 /tmp/4072-fic-old.avi > > > > I see other differences caused by patches today i still need to investigate > > what causes what > > Fixing this will require larger restructuring first, so I am dropping > this patch for now. > > Please let me know if the rest of the set breaks anything else. all failures from this patch set where from this patch i think thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I know you won't believe me, but the highest form of Human Excellence is to question oneself and others. -- Socrates