mirror of https://github.com/mgba-emu/mgba.git
FFmpeg: Fix audio conversion producing gaps
This commit is contained in:
parent
700787928d
commit
1a800c4dca
1
CHANGES
1
CHANGES
|
@ -23,6 +23,7 @@ Other fixes:
|
|||
- 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)
|
||||
- FFmpeg: Fix audio conversion producing gaps
|
||||
Misc:
|
||||
- Qt: Add missing HEVC NVENC option (fixes mgba.io/i/1323)
|
||||
- Qt: Improve camera initialization
|
||||
|
|
|
@ -491,7 +491,7 @@ void _ffmpegPostAudioFrame(struct mAVStream* stream, int16_t left, int16_t right
|
|||
#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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue