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
a3d020ef
Commit
a3d020ef
authored
Jul 27, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/ffmpeg: use AVCodecParameters on FFmpeg 3.1
The AVCodecContext attribute is deprecated.
parent
8412d94d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
NEWS
NEWS
+1
-0
FfmpegDecoderPlugin.cxx
src/decoder/plugins/FfmpegDecoderPlugin.cxx
+20
-0
No files found.
NEWS
View file @
a3d020ef
...
...
@@ -2,6 +2,7 @@ ver 0.19.18 (not yet released)
* decoder
- ffmpeg: fix crash with older FFmpeg versions (< 3.0)
- ffmpeg: log detailed error message
- ffmpeg: support FFmpeg 3.1
ver 0.19.17 (2016/07/09)
* decoder
...
...
src/decoder/plugins/FfmpegDecoderPlugin.cxx
View file @
a3d020ef
...
...
@@ -76,6 +76,24 @@ ffmpeg_init(gcc_unused const config_param ¶m)
return
true
;
}
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 5, 0)
gcc_pure
static
const
AVCodecParameters
&
GetCodecParameters
(
const
AVStream
&
stream
)
{
return
*
stream
.
codecpar
;
}
gcc_pure
static
AVSampleFormat
GetSampleFormat
(
const
AVCodecParameters
&
codec_params
)
{
return
AVSampleFormat
(
codec_params
.
format
);
}
#else
gcc_pure
static
const
AVCodecContext
&
GetCodecParameters
(
const
AVStream
&
stream
)
...
...
@@ -90,6 +108,8 @@ GetSampleFormat(const AVCodecContext &codec_context)
return
codec_context
.
sample_fmt
;
}
#endif
gcc_pure
static
bool
IsAudio
(
const
AVStream
&
stream
)
...
...
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