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
313d1d5d
Commit
313d1d5d
authored
Jan 15, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/ffmpeg: support libav v10_alpha1
parent
b7d61335
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
NEWS
NEWS
+2
-0
FfmpegDecoderPlugin.cxx
src/decoder/FfmpegDecoderPlugin.cxx
+11
-1
No files found.
NEWS
View file @
313d1d5d
ver 0.18.8 (not yet released)
* decoder
- ffmpeg: support libav v10_alpha1
ver 0.18.7 (2013/01/13)
* playlist
...
...
src/decoder/FfmpegDecoderPlugin.cxx
View file @
313d1d5d
...
...
@@ -38,6 +38,10 @@ extern "C" {
#include <libavutil/avutil.h>
#include <libavutil/log.h>
#include <libavutil/mathematics.h>
#if LIBAVUTIL_VERSION_MAJOR >= 53
#include <libavutil/frame.h>
#endif
}
#include <assert.h>
...
...
@@ -453,7 +457,11 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
decoder_initialized
(
decoder
,
audio_format
,
input
.
seekable
,
total_time
);
#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"
);
avformat_close_input
(
&
format_context
);
...
...
@@ -497,7 +505,9 @@ ffmpeg_decode(Decoder &decoder, InputStream &input)
}
}
while
(
cmd
!=
DecoderCommand
::
STOP
);
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0)
#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_freep
(
&
frame
);
...
...
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