mirror of https://github.com/mgba-emu/mgba.git
FFmpeg: Fix audio conversion producing gaps
This commit is contained in:
parent
3e86eeda70
commit
bb7f41e8cc
1
CHANGES
1
CHANGES
|
@ -39,6 +39,7 @@ Other fixes:
|
||||||
- FFmpeg: Improve initialization reliability and cleanup
|
- FFmpeg: Improve initialization reliability and cleanup
|
||||||
- Wii: Fix aspect ratio (fixes mgba.io/i/500)
|
- Wii: Fix aspect ratio (fixes mgba.io/i/500)
|
||||||
- Qt: Fix some Qt display driver race conditions
|
- Qt: Fix some Qt display driver race conditions
|
||||||
|
- FFmpeg: Fix audio conversion producing gaps
|
||||||
Misc:
|
Misc:
|
||||||
- GBA Savedata: EEPROM performance fixes
|
- GBA Savedata: EEPROM performance fixes
|
||||||
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
||||||
|
|
|
@ -499,7 +499,7 @@ void _ffmpegPostAudioFrame(struct mAVStream* stream, int16_t left, int16_t right
|
||||||
#if LIBAVCODEC_VERSION_MAJOR >= 55
|
#if LIBAVCODEC_VERSION_MAJOR >= 55
|
||||||
av_frame_make_writable(encoder->audioFrame);
|
av_frame_make_writable(encoder->audioFrame);
|
||||||
#endif
|
#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);
|
swr_convert(encoder->resampleContext, NULL, 0, (const uint8_t**) &encoder->audioBuffer, encoder->audioBufferSize / 4);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue