mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
unnecessary brackets removed
- distinction ffmpeg versions
Origin commit data
------------------
Commit: 00885fda4a
Author: Frankenstone <dampf_acc@online.de>
Date: 2021-05-17 (Mon, 17 May 2021)
This commit is contained in:
@@ -204,7 +204,7 @@ void CFfmpegDec::DeInit(void)
|
||||
{
|
||||
if(c)
|
||||
{
|
||||
#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57, 83, 100))
|
||||
#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57, 83, 100)
|
||||
avcodec_close(c);
|
||||
#else
|
||||
avcodec_free_context(&c);
|
||||
@@ -213,7 +213,7 @@ void CFfmpegDec::DeInit(void)
|
||||
}
|
||||
if (avioc)
|
||||
{
|
||||
#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57, 83, 100))
|
||||
#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57, 83, 100)
|
||||
av_free(avioc);
|
||||
#else
|
||||
av_freep(&avioc->buffer);
|
||||
@@ -240,7 +240,7 @@ CBaseDec::RetCode CFfmpegDec::Decoder(FILE *_in, int /*OutputFd*/, State* state,
|
||||
Status=DATA_ERR;
|
||||
return Status;
|
||||
}
|
||||
#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,25,101 ))
|
||||
#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,25,101 )
|
||||
c = avc->streams[best_stream]->codec;
|
||||
#else
|
||||
c = avcodec_alloc_context3(codec);
|
||||
@@ -484,7 +484,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,25,101 ))
|
||||
#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)
|
||||
@@ -505,7 +505,7 @@ bool CFfmpegDec::SetMetaData(FILE *_in, CAudioMetaData* m, bool save_cover)
|
||||
DeInit();
|
||||
return false;
|
||||
}
|
||||
#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT( 57,25,101 ))
|
||||
#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;
|
||||
@@ -535,7 +535,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,25,101 ))
|
||||
#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
|
||||
|
Reference in New Issue
Block a user