diff --git a/src/driver/audiodec/ffmpegdec.cpp b/src/driver/audiodec/ffmpegdec.cpp index 695f67d89..dc49aea02 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 (LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) 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 (LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) 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 (LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) 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 (LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) 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 0c234cbe6..ace7de81e 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -1943,7 +1943,7 @@ void CStreamRec::FillMovieInfo(CZapitChannel * /*channel*/, APIDList & /*apid_li for (unsigned i = 0; i < ofcx->nb_streams; i++) { AVStream *st = ofcx->streams[i]; -#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) AVCodecContext * codec = st->codec; #else AVCodecParameters * codec = st->codecpar; @@ -2176,7 +2176,7 @@ bool CStreamRec::Open(CZapitChannel * channel) stream_index = -1; int stid = 0x200; for (unsigned i = 0; i < ifcx->nb_streams; i++) { -#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) AVCodecContext * iccx = ifcx->streams[i]->codec; AVStream *ost = avformat_new_stream(ofcx, iccx->codec); avcodec_copy_context(ost->codec, iccx); @@ -2232,7 +2232,7 @@ void CStreamRec::run() break; if (pkt.stream_index < 0) continue; -#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) 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 d2f4a2d3c..9d23e25fc 100644 --- a/src/driver/streamts.cpp +++ b/src/driver/streamts.cpp @@ -846,7 +846,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 (LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) AVCodecContext * iccx = ifcx->streams[i]->codec; AVStream *ost = avformat_new_stream(ofcx, iccx->codec); avcodec_copy_context(ost->codec, iccx); @@ -919,7 +919,7 @@ void CStreamStream::run() if (pkt.stream_index < 0) continue; -#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 57,5,0 )) +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,5,0 )) AVCodecContext *codec = ifcx->streams[pkt.stream_index]->codec; #else AVCodecParameters *codec = ifcx->streams[pkt.stream_index]->codecpar;