mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-29 03:00:24 +00:00
Free the AVFrame using the correct call.
This commit is contained in:
parent
187d988201
commit
049b20f773
@ -780,7 +780,7 @@ static bool encode_audio(ffemu_t *handle, AVPacket *pkt, bool dry)
|
||||
if (avcodec_encode_audio2(handle->audio.codec,
|
||||
pkt, dry ? NULL : frame, &got_packet) < 0)
|
||||
{
|
||||
av_freep(&frame);
|
||||
avcodec_free_frame(&frame);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -789,7 +789,7 @@ static bool encode_audio(ffemu_t *handle, AVPacket *pkt, bool dry)
|
||||
pkt->size = 0;
|
||||
pkt->pts = AV_NOPTS_VALUE;
|
||||
pkt->dts = AV_NOPTS_VALUE;
|
||||
av_freep(&frame);
|
||||
avcodec_free_frame(&frame);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -807,7 +807,7 @@ static bool encode_audio(ffemu_t *handle, AVPacket *pkt, bool dry)
|
||||
handle->muxer.astream->time_base);
|
||||
}
|
||||
|
||||
av_freep(&frame);
|
||||
avcodec_free_frame(&frame);
|
||||
|
||||
#else
|
||||
if (dry)
|
||||
|
Loading…
Reference in New Issue
Block a user