mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Buildfix for Symbian/Blackberry/etc.
This commit is contained in:
1 parent
60378dd59d
commit
d30508ac43
2 files changed
+16
No files matched your search
@@ -307,8 +307,16 @@ struct Atrac {
|
||||
// All of these allow null pointers.
|
||||
av_freep(&pFrame);
|
||||
swr_free(&pSwrCtx);
|
||||
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 52, 0)
|
||||
// If necessary, extradata is automatically freed.
|
||||
avcodec_free_context(&pCodecCtx);
|
||||
#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);
|
||||
#endif
|
||||
av_free_packet(packet);
|
||||
delete packet;
|
||||
packet = nullptr;
|
||||
|
||||
@@ -133,7 +133,15 @@ SimpleAudio::~SimpleAudio() {
|
||||
#ifdef USE_FFMPEG
|
||||
swr_free(&swrCtx_);
|
||||
av_frame_free(&frame_);
|
||||
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 52, 0)
|
||||
avcodec_free_context(&codecCtx_);
|
||||
#else
|
||||
// Future versions may add other things to free, but avcodec_free_context didn't exist yet here.
|
||||
avcodec_close(codecCtx_);
|
||||
av_freep(&codecCtx_->extradata);
|
||||
av_freep(&codecCtx_->subtitle_header);
|
||||
av_freep(&codecCtx_);
|
||||
#endif
|
||||
codec_ = 0;
|
||||
#endif // USE_FFMPEG
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user