FFmpeg: Fix GIF recording (fixes #2393)

This commit is contained in:
Vicki Pfau 2022-01-20 23:49:56 -08:00
parent c34e031d8c
commit 819159f1d4
2 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ Emulation fixes:
- GBA I/O: Disable open bus behavior on invalid register 06A - GBA I/O: Disable open bus behavior on invalid register 06A
Other fixes: Other fixes:
- FFmpeg: Fix crash when encoding audio with some containers - FFmpeg: Fix crash when encoding audio with some containers
- FFmpeg: Fix GIF recording (fixes mgba.io/i/2393)
- GB, GBA: Save writeback-pending masked saves on unload (fixes mgba.io/i/2396) - GB, GBA: Save writeback-pending masked saves on unload (fixes mgba.io/i/2396)
0.9.3: (2021-12-17) 0.9.3: (2021-12-17)

View File

@ -820,7 +820,7 @@ void _ffmpegPostVideoFrame(struct mAVStream* stream, const color_t* pixels, size
sws_scale(encoder->scaleContext, (const uint8_t* const*) &pixels, (const int*) &stride, 0, encoder->iheight, encoder->videoFrame->data, encoder->videoFrame->linesize); sws_scale(encoder->scaleContext, (const uint8_t* const*) &pixels, (const int*) &stride, 0, encoder->iheight, encoder->videoFrame->data, encoder->videoFrame->linesize);
if (encoder->graph) { if (encoder->graph) {
if (av_buffersrc_add_frame(encoder->source, encoder->videoFrame) < 0) { if (av_buffersrc_write_frame(encoder->source, encoder->videoFrame) < 0) {
return; return;
} }
while (true) { while (true) {