Files
test2/source
Aras Pranckevicius 71897ebf95 Fix #139580: Movie proxies can be missing the last frame
Commit 611940805e changed movie proxies to use MP4 container format
instead of AVI (to support video rotation metadata), however MP4
container needs more care compared to AVI. Several parts of proxy
generation were subtly wrong before:

- AVStream.avg_frame_rate was not set, this can make the mp4 muxer
  incorrectly determine the video duration for the "moov" atom.
- AV_CODEC_FLAG_GLOBAL_HEADER (needed by mp4 more than by avi) was not
  set since the code was checking the flags on the wrong structure.
- avcodec_parameters_from_context were called at the wrong place
  (need to be called after avcodec_open2, not before it)
- avcodec_flush_buffers call before av_write_trailer was incorrect;
  the codec state should not be reset there!
- avcodec_free_context should be called after fully finishing with the
  file (i.e. after avio_close)

Pull Request: https://projects.blender.org/blender/blender/pulls/139731
2025-06-02 16:24:41 +02:00
..