FFmpeg: Fix encoding of time base

This commit is contained in:
Vicki Pfau 2020-07-15 01:27:25 -07:00
parent 7328e96ced
commit 746ee657d7
2 changed files with 3 additions and 0 deletions

View File

@ -37,6 +37,7 @@ Other fixes:
- 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)

View File

@ -365,6 +365,8 @@ bool FFmpegEncoderOpen(struct FFmpegEncoder* encoder, const char* outfile) {
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;