diff --git a/src/driver/audiodec/ffmpegdec.cpp b/src/driver/audiodec/ffmpegdec.cpp index dc49aea02..19c48a9eb 100644 --- a/src/driver/audiodec/ffmpegdec.cpp +++ b/src/driver/audiodec/ffmpegdec.cpp @@ -223,7 +223,7 @@ CBaseDec::RetCode CFfmpegDec::Decoder(FILE *_in, int /*OutputFd*/, State* state, Status=DATA_ERR; return Status; } -#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,25,101 )) AVCodecContext *c = avc->streams[best_stream]->codec; #else AVCodecContext *c = avcodec_alloc_context3(codec); @@ -460,7 +460,7 @@ bool CFfmpegDec::SetMetaData(FILE *_in, CAudioMetaData* m, bool save_cover) if (!is_stream) { GetMeta(avc->metadata); for(unsigned int i = 0; i < avc->nb_streams; i++) { -#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,25,101 )) if (avc->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) #else if (avc->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) @@ -481,7 +481,7 @@ bool CFfmpegDec::SetMetaData(FILE *_in, CAudioMetaData* m, bool save_cover) DeInit(); return false; } -#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,25,101 )) if (!codec) codec = avcodec_find_decoder(avc->streams[best_stream]->codec->codec_id); samplerate = avc->streams[best_stream]->codec->sample_rate; @@ -511,7 +511,7 @@ bool CFfmpegDec::SetMetaData(FILE *_in, CAudioMetaData* m, bool save_cover) printf("CFfmpegDec: format %s (%s) duration %ld\n", avc->iformat->name, type_info.c_str(), total_time); for(unsigned int i = 0; i < avc->nb_streams; i++) { -#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,25,101 )) if (avc->streams[i]->codec->bit_rate > 0) bitrate += avc->streams[i]->codec->bit_rate; #else diff --git a/src/driver/record.cpp b/src/driver/record.cpp index efc1e0fd4..8e98519c6 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -2025,7 +2025,7 @@ void CStreamRec::FillMovieInfo(CZapitChannel * /*channel*/, APIDList & /*apid_li for (unsigned i = 0; i < ofcx->nb_streams; i++) { AVStream *st = ofcx->streams[i]; -#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,25,101 )) AVCodecContext * codec = st->codec; #else AVCodecParameters * codec = st->codecpar; @@ -2258,7 +2258,7 @@ bool CStreamRec::Open(CZapitChannel * channel) stream_index = -1; int stid = 0x200; for (unsigned i = 0; i < ifcx->nb_streams; i++) { -#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,25,101 )) AVCodecContext * iccx = ifcx->streams[i]->codec; AVStream *ost = avformat_new_stream(ofcx, iccx->codec); avcodec_copy_context(ost->codec, iccx); @@ -2314,7 +2314,7 @@ void CStreamRec::run() break; if (pkt.stream_index < 0) continue; -#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,25,101 )) AVCodecContext *codec = ifcx->streams[pkt.stream_index]->codec; #else AVCodecParameters *codec = ifcx->streams[pkt.stream_index]->codecpar; diff --git a/src/driver/streamts.cpp b/src/driver/streamts.cpp index 2a7e172bd..e1e9e44ce 100644 --- a/src/driver/streamts.cpp +++ b/src/driver/streamts.cpp @@ -850,7 +850,7 @@ bool CStreamStream::Open() av_dict_copy(&ofcx->metadata, ifcx->metadata, 0); int stid = 0x200; for (unsigned i = 0; i < ifcx->nb_streams; i++) { -#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,25,101 )) AVCodecContext * iccx = ifcx->streams[i]->codec; AVStream *ost = avformat_new_stream(ofcx, iccx->codec); avcodec_copy_context(ost->codec, iccx); @@ -923,7 +923,7 @@ void CStreamStream::run() if (pkt.stream_index < 0) continue; -#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,25,101 )) AVCodecContext *codec = ifcx->streams[pkt.stream_index]->codec; #else AVCodecParameters *codec = ifcx->streams[pkt.stream_index]->codecpar;