Origin commit data
------------------
Commit: 3575c5f397
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-18 (Sun, 18 Jun 2017)
This commit is contained in:
vanhofen
2017-06-18 23:00:29 +02:00
3 changed files with 9 additions and 9 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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;