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 354f898a03
commit b5e94b0abb
2 changed files with 2 additions and 1 deletions

View File

@ -18,6 +18,7 @@ Emulation fixes:
- GBA Memory: Fix misaligned 32-bit I/O loads (fixes mgba.io/i/2307) - GBA Memory: Fix misaligned 32-bit I/O loads (fixes mgba.io/i/2307)
Other fixes: Other fixes:
- Core: Don't attempt to restore rewind diffs past start of rewind - Core: Don't attempt to restore rewind diffs past start of rewind
- FFmpeg: Fix crash when encoding audio with some containers
Misc: Misc:
- Core: Suspend runloop when a core crashes - Core: Suspend runloop when a core crashes
- mGUI: Add margin to right-aligned menu text (fixes mgba.io/i/871) - mGUI: Add margin to right-aligned menu text (fixes mgba.io/i/871)

View File

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