Skip to content

Commit

Permalink
FFmpeg: Fix failing to record videos with CRF video (fixes #3368)
Browse files Browse the repository at this point in the history
  • Loading branch information
endrift committed Dec 25, 2024
1 parent 08430fc commit d82fc3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Emulation fixes:
Other fixes:
- Core: Fix inconsistencies with setting game-specific overrides (fixes mgba.io/i/2963)
- Debugger: Fix writing to specific segment in command-line debugger
- FFmpeg: Fix failing to record videos with CRF video (fixes mgba.io/i/3368)
- GB Serialize: Prevent loading invalid states where LY >= 144 in modes other than 1
- GBA: Fix getting game info for multiboot ROMs
- GBA Core: Fix booting into BIOS when skip BIOS is enabled
Expand Down
4 changes: 3 additions & 1 deletion src/feature/ffmpeg/ffmpeg-encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,9 @@ bool FFmpegEncoderOpen(struct FFmpegEncoder* encoder, const char* outfile) {
encoder->videoStream = avformat_new_stream(encoder->context, vcodec);
encoder->video = encoder->videoStream->codec;
#endif
encoder->video->bit_rate = encoder->videoBitrate;
if (encoder->videoBitrate >= 0) {
encoder->video->bit_rate = encoder->videoBitrate;
}
encoder->video->width = encoder->width;
encoder->video->height = encoder->height;
encoder->video->time_base = (AVRational) { encoder->frameCycles * encoder->frameskip, encoder->cycles };
Expand Down

0 comments on commit d82fc3d

Please sign in to comment.