Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
69f4178b
Commit
69f4178b
authored
Aug 02, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/ffmpeg: require at least version 11.12
This is the version in Debian Jessie (oldstable).
parent
027e562f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
42 deletions
+2
-42
NEWS
NEWS
+1
-0
configure.ac
configure.ac
+1
-1
FfmpegDecoderPlugin.cxx
src/decoder/plugins/FfmpegDecoderPlugin.cxx
+0
-25
Buffer.hxx
src/lib/ffmpeg/Buffer.hxx
+0
-16
No files found.
NEWS
View file @
69f4178b
...
...
@@ -19,6 +19,7 @@ ver 0.21 (not yet released)
* tags
- new tags "OriginalDate", "MUSICBRAINZ_WORKID"
* decoder
- ffmpeg: require at least version 11.12
- gme: try loading m3u sidecar files
- hybrid_dsd: new decoder plugin
- mad: move "gapless_mp3_playback" setting to "decoder" block
...
...
configure.ac
View file @
69f4178b
...
...
@@ -911,7 +911,7 @@ MPD_ENABLE_AUTO_LIB(aac, FAAD, faad, NeAACDecOpen, [-lfaad], [],
dnl ---------------------------------- ffmpeg ---------------------------------
MPD_ENABLE_AUTO_PKG(ffmpeg, FFMPEG,
[libavformat >= 5
3.17 libavcodec >= 53.25 libavutil >= 51.17
],
[libavformat >= 5
6.1 libavcodec >= 56.1 libavutil >= 54.3
],
[ffmpeg decoder library], [libavformat+libavcodec+libavutil not found])
dnl ----------------------------------- FLAC ----------------------------------
...
...
src/decoder/plugins/FfmpegDecoderPlugin.cxx
View file @
69f4178b
...
...
@@ -47,10 +47,7 @@ extern "C" {
#include <libavformat/avformat.h>
#include <libavformat/avio.h>
#include <libavutil/avutil.h>
#if LIBAVUTIL_VERSION_MAJOR >= 53
#include <libavutil/frame.h>
#endif
}
#include <assert.h>
...
...
@@ -539,8 +536,6 @@ FfmpegScanMetadata(const AVFormatContext &format_context, int audio_stream,
handler
);
}
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(56, 1, 0)
static
void
FfmpegScanTag
(
const
AVFormatContext
&
format_context
,
int
audio_stream
,
TagBuilder
&
tag
)
...
...
@@ -571,8 +566,6 @@ FfmpegCheckTag(DecoderClient &client, InputStream &is,
client
.
SubmitTag
(
is
,
tag
.
Commit
());
}
#endif
static
void
FfmpegDecode
(
DecoderClient
&
client
,
InputStream
&
input
,
AVFormatContext
&
format_context
)
...
...
@@ -598,17 +591,11 @@ FfmpegDecode(DecoderClient &client, InputStream &input,
const
auto
&
codec_params
=
GetCodecParameters
(
av_stream
);
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 25, 0)
const
AVCodecDescriptor
*
codec_descriptor
=
avcodec_descriptor_get
(
codec_params
.
codec_id
);
if
(
codec_descriptor
!=
nullptr
)
FormatDebug
(
ffmpeg_domain
,
"codec '%s'"
,
codec_descriptor
->
name
);
#else
if
(
codec_context
->
codec_name
[
0
]
!=
0
)
FormatDebug
(
ffmpeg_domain
,
"codec '%s'"
,
codec_context
->
codec_name
);
#endif
AVCodec
*
codec
=
avcodec_find_decoder
(
codec_params
.
codec_id
);
...
...
@@ -670,24 +657,14 @@ FfmpegDecode(DecoderClient &client, InputStream &input,
FfmpegParseMetaData
(
client
,
format_context
,
audio_stream
);
#if LIBAVUTIL_VERSION_MAJOR >= 53
AVFrame
*
frame
=
av_frame_alloc
();
#else
AVFrame
*
frame
=
avcodec_alloc_frame
();
#endif
if
(
!
frame
)
{
LogError
(
ffmpeg_domain
,
"Could not allocate frame"
);
return
;
}
AtScopeExit
(
&
frame
)
{
#if LIBAVUTIL_VERSION_MAJOR >= 53
av_frame_free
(
&
frame
);
#elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0)
avcodec_free_frame
(
&
frame
);
#else
av_free
(
frame
);
#endif
};
FfmpegBuffer
interleaved_buffer
;
...
...
@@ -720,9 +697,7 @@ FfmpegDecode(DecoderClient &client, InputStream &input,
/* end of file */
break
;
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(56, 1, 0)
FfmpegCheckTag
(
client
,
input
,
format_context
,
audio_stream
);
#endif
if
(
packet
.
size
>
0
&&
packet
.
stream_index
==
audio_stream
)
{
cmd
=
ffmpeg_send_packet
(
client
,
input
,
...
...
src/lib/ffmpeg/Buffer.hxx
View file @
69f4178b
...
...
@@ -22,15 +22,6 @@
extern
"C"
{
#include <libavutil/mem.h>
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52, 18, 0)
#define HAVE_AV_FAST_MALLOC
#else
#include <libavcodec/avcodec.h>
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 25, 0)
#define HAVE_AV_FAST_MALLOC
#endif
#endif
}
#include <stddef.h>
...
...
@@ -53,14 +44,7 @@ public:
gcc_malloc
void
*
Get
(
size_t
min_size
)
{
#ifdef HAVE_AV_FAST_MALLOC
av_fast_malloc
(
&
data
,
&
size
,
min_size
);
#else
void
*
new_data
=
av_fast_realloc
(
data
,
&
size
,
min_size
);
if
(
new_data
==
nullptr
)
return
AVERROR
(
ENOMEM
);
data
=
new_data
;
#endif
return
data
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment