FFmpeg: Fix encoding of time base
Vicki Pfau vi@endrift.com
Wed, 15 Jul 2020 01:27:25 -0700
2 files changed,
3 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -37,6 +37,7 @@ - CMake: Fix build with libzip 1.7
- Core: Ensure ELF regions can be written before trying - Debugger: Don't skip undefined instructions when debugger attached - FFmpeg: Fix some small memory leaks + - FFmpeg: Fix encoding of time base - GB Core: Fix extracting SRAM when none is present - GBA Savedata: Fix extracting save when not yet configured in-game - Qt: Force OpenGL paint engine creation thread (fixes mgba.io/i/1642)
M
src/feature/ffmpeg/ffmpeg-encoder.c
→
src/feature/ffmpeg/ffmpeg-encoder.c
@@ -365,6 +365,8 @@ encoder->video->width = encoder->width;
encoder->video->height = encoder->height; encoder->video->time_base = (AVRational) { VIDEO_TOTAL_LENGTH * encoder->frameskip, GBA_ARM7TDMI_FREQUENCY }; encoder->video->framerate = (AVRational) { GBA_ARM7TDMI_FREQUENCY, VIDEO_TOTAL_LENGTH * encoder->frameskip }; + encoder->videoStream->time_base = encoder->video->time_base; + encoder->videoStream->avg_frame_rate = encoder->video->framerate; encoder->video->pix_fmt = encoder->pixFormat; encoder->video->gop_size = 60; encoder->video->max_b_frames = 3;