Fix future FFMpeg API changes

avcodec_find_decoder now returns const AVCodec*.
pull/3094/head
Dan Church 3 years ago
parent b2791fd487
commit 70a0229010
No known key found for this signature in database
GPG Key ID: EA2BF379CD2CDBD0

@ -221,7 +221,7 @@ void FFmpeg_Decoder::open(const std::string &fname)
if(!mStream)
throw std::runtime_error("No audio streams in "+fname);
AVCodec *codec = avcodec_find_decoder((*mStream)->codecpar->codec_id);
const AVCodec *codec = avcodec_find_decoder((*mStream)->codecpar->codec_id);
if(!codec)
{
std::string ss = "No codec found for id " +

@ -71,7 +71,7 @@ MovieAudioDecoder::MovieAudioDecoder(VideoState* videoState)
{
mAudioResampler.reset(new AudioResampler());
AVCodec *codec = avcodec_find_decoder(mAVStream->codecpar->codec_id);
const AVCodec *codec = avcodec_find_decoder(mAVStream->codecpar->codec_id);
if(!codec)
{
std::string ss = "No codec found for id " +

@ -632,7 +632,7 @@ bool VideoState::update()
int VideoState::stream_open(int stream_index, AVFormatContext *pFormatCtx)
{
AVCodec *codec;
const AVCodec *codec;
if(stream_index < 0 || stream_index >= static_cast<int>(pFormatCtx->nb_streams))
return -1;

Loading…
Cancel
Save