FFmpeg: Fix crash when encoding audio with some containers

This commit is contained in:
Vicki Pfau 2021-12-18 15:48:57 -08:00
parent 1163869139
commit 588b18bdf9
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
0.9.4: (Future)
Other fixes:
- FFmpeg: Fix crash when encoding audio with some containers
0.9.3: (2021-12-17)
Emulation fixes:
- GB I/O: Fix incrementing SGB controller when P14 is low (fixes mgba.io/i/2202)

View File

@ -771,7 +771,7 @@ bool _ffmpegWriteAudioFrame(struct FFmpegEncoder* encoder, struct AVFrame* audio
#ifdef FFMPEG_USE_PACKET_UNREF
av_packet_move_ref(packet, tempPacket);
av_packet_free(&packet);
av_packet_free(&tempPacket);
#else
av_free_packet(packet);
av_freep(&packet);