all repos — mgba @ bb7f41e8cca003d57f7470293a9951d9e027a8a5

mGBA Game Boy Advance Emulator

FFmpeg: Fix audio conversion producing gaps
Vicki Pfau vi@endrift.com
Thu, 16 May 2019 22:30:48 -0700
commit

bb7f41e8cca003d57f7470293a9951d9e027a8a5

parent

3e86eeda7004757be9926876224af026a07f7eca

2 files changed, 2 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -39,6 +39,7 @@ - Qt: Fix adjusting magnification in tile viewer when not fitting to window

- FFmpeg: Improve initialization reliability and cleanup - Wii: Fix aspect ratio (fixes mgba.io/i/500) - Qt: Fix some Qt display driver race conditions + - FFmpeg: Fix audio conversion producing gaps Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
M src/feature/ffmpeg/ffmpeg-encoder.csrc/feature/ffmpeg/ffmpeg-encoder.c

@@ -499,7 +499,7 @@ #else

#if LIBAVCODEC_VERSION_MAJOR >= 55 av_frame_make_writable(encoder->audioFrame); #endif - if (swr_get_out_samples(encoder->resampleContext, encoder->audioBufferSize / 4) < encoder->audioFrame->nb_samples) { + if (swr_get_out_samples(encoder->resampleContext, 1) < encoder->audioFrame->nb_samples) { swr_convert(encoder->resampleContext, NULL, 0, (const uint8_t**) &encoder->audioBuffer, encoder->audioBufferSize / 4); return; }