Video: Ensure FFmpeg encoder has audio frames

This commit is contained in:
Jeffrey Pfau 2014-12-23 23:13:52 -08:00
parent 8d52bf7b28
commit fc550c792e
2 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,7 @@ Bugfixes:
- Qt: Properly set default video recording settings
- GBA Audio: Make larger buffer sizes than 2048 actually work properly
- GBA Video: Fix blend issues with obscured middle layers
- Video: Ensure FFmpeg encoder has audio frames
Misc:
- Qt: Disable sync to video by default
- GBA: Exit cleanly on FATAL if the port supports it

View File

@ -225,6 +225,9 @@ bool FFmpegEncoderOpen(struct FFmpegEncoder* encoder, const char* outfile) {
#else
encoder->audioFrame = avcodec_alloc_frame();
#endif
if (!encoder->audio->frame_size) {
encoder->audio->frame_size = 1024;
}
encoder->audioFrame->nb_samples = encoder->audio->frame_size;
encoder->audioFrame->format = encoder->audio->sample_fmt;
encoder->audioFrame->pts = 0;