mirror of https://github.com/mgba-emu/mgba.git
Video: Ensure FFmpeg encoder has audio frames
This commit is contained in:
parent
55df6ce26b
commit
d6def0d407
1
CHANGES
1
CHANGES
|
@ -25,6 +25,7 @@ Bugfixes:
|
||||||
- GBA Audio: Make larger buffer sizes than 2048 actually work properly
|
- GBA Audio: Make larger buffer sizes than 2048 actually work properly
|
||||||
- GBA Audio: Audio buffer sizes are now correct sizes for both sample rates
|
- GBA Audio: Audio buffer sizes are now correct sizes for both sample rates
|
||||||
- GBA Video: Fix blend issues with obscured middle layers
|
- GBA Video: Fix blend issues with obscured middle layers
|
||||||
|
- Video: Ensure FFmpeg encoder has audio frames
|
||||||
Misc:
|
Misc:
|
||||||
- Qt: Disable sync to video by default
|
- Qt: Disable sync to video by default
|
||||||
- GBA: Exit cleanly on FATAL if the port supports it
|
- GBA: Exit cleanly on FATAL if the port supports it
|
||||||
|
|
|
@ -225,6 +225,9 @@ bool FFmpegEncoderOpen(struct FFmpegEncoder* encoder, const char* outfile) {
|
||||||
#else
|
#else
|
||||||
encoder->audioFrame = avcodec_alloc_frame();
|
encoder->audioFrame = avcodec_alloc_frame();
|
||||||
#endif
|
#endif
|
||||||
|
if (!encoder->audio->frame_size) {
|
||||||
|
encoder->audio->frame_size = 1024;
|
||||||
|
}
|
||||||
encoder->audioFrame->nb_samples = encoder->audio->frame_size;
|
encoder->audioFrame->nb_samples = encoder->audio->frame_size;
|
||||||
encoder->audioFrame->format = encoder->audio->sample_fmt;
|
encoder->audioFrame->format = encoder->audio->sample_fmt;
|
||||||
encoder->audioFrame->pts = 0;
|
encoder->audioFrame->pts = 0;
|
||||||
|
|
Loading…
Reference in New Issue