Merge branch 'ni/tuxbox' into ni/mp/tuxbox

Origin commit data
------------------
Branch: ni/coolstream
Commit: e5cf06ec8a
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-19 (Mon, 19 Jun 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-06-19 23:08:41 +02:00
17 changed files with 301 additions and 287 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);
@@ -456,7 +456,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)
@@ -477,7 +477,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;
@@ -507,7 +507,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