diff --git a/CHANGES b/CHANGES index b08e39490..a113e7038 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,6 @@ 0.10.5: (Future) Other fixes: + - FFmpeg: Fix failing to record videos with CRF video (fixes mgba.io/i/3368) - GBA Core: Fix booting into BIOS when skip BIOS is enabled - GBA Hardware: Fix loading states unconditionally overwriting GPIO memory diff --git a/src/feature/ffmpeg/ffmpeg-encoder.c b/src/feature/ffmpeg/ffmpeg-encoder.c index 345846254..aabf10bc2 100644 --- a/src/feature/ffmpeg/ffmpeg-encoder.c +++ b/src/feature/ffmpeg/ffmpeg-encoder.c @@ -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 };