mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-17 12:47:46 +00:00
[iOS]: prevent crashing (EXC_BAD_ACCESS) when releasing FFMPEG context by adding NULL check on codec context pointer
This commit is contained in:
parent
84216ba3c3
commit
73c04e59fa
@ -374,9 +374,11 @@ struct Atrac {
|
||||
#else
|
||||
// Future versions may add other things to free, but avcodec_free_context didn't exist yet here.
|
||||
avcodec_close(pCodecCtx);
|
||||
av_freep(&pCodecCtx->extradata);
|
||||
av_freep(&pCodecCtx->subtitle_header);
|
||||
av_freep(&pCodecCtx);
|
||||
if ( pCodecCtx != NULL ) {
|
||||
av_freep(&pCodecCtx->extradata);
|
||||
av_freep(&pCodecCtx->subtitle_header);
|
||||
av_freep(&pCodecCtx);
|
||||
}
|
||||
#endif
|
||||
av_free_packet(packet);
|
||||
delete packet;
|
||||
|
Loading…
x
Reference in New Issue
Block a user