mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-19 21:52:45 +00:00
MediaEngine: adjust for AVStream.codec deprecation
This commit is contained in:
parent
5c5fa8dabc
commit
7a7c655615
@ -455,6 +455,14 @@ bool MediaEngine::setVideoStream(int streamNum, bool force) {
|
||||
return false;
|
||||
}
|
||||
AVCodecContext *m_pCodecCtx = m_pFormatCtx->streams[streamNum]->codec;
|
||||
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57,33,100)
|
||||
AVCodecParameters *m_pCodecPar = m_pFormatCtx->streams[streamNum]->codecpar;
|
||||
|
||||
// Update from deprecated public codec context
|
||||
if (avcodec_parameters_from_context(m_pCodecPar, m_pCodecCtx) < 0) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Find the decoder for the video stream
|
||||
AVCodec *pCodec = avcodec_find_decoder(m_pCodecCtx->codec_id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user