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
abd19498
Commit
abd19498
authored
Jan 05, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/ffmpeg: support libavformat 0.8
parent
4e6bc77a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
3 deletions
+47
-3
NEWS
NEWS
+1
-1
ffmpeg_decoder_plugin.c
src/decoder/ffmpeg_decoder_plugin.c
+46
-2
No files found.
NEWS
View file @
abd19498
...
...
@@ -2,7 +2,7 @@ ver 0.16.7 (2011/??/??)
* input:
- ffmpeg: support libavformat 0.7
* decoder:
- ffmpeg: support libavformat 0.
7
, libavcodec 0.8
- ffmpeg: support libavformat 0.
8
, libavcodec 0.8
* output:
- httpd: fix excessive buffering
- openal: force 16 bit playback, as 8 bit doesn't work
...
...
src/decoder/ffmpeg_decoder_plugin.c
View file @
abd19498
...
...
@@ -443,9 +443,19 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
return
;
}
if
(
av_find_stream_info
(
format_context
)
<
0
)
{
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,2,0)
const
int
find_result
=
avformat_find_stream_info
(
format_context
,
NULL
);
#else
const
int
find_result
=
av_find_stream_info
(
format_context
);
#endif
if
(
find_result
<
0
)
{
g_warning
(
"Couldn't find stream info
\n
"
);
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
avformat_close_input
(
&
format_context
);
#else
av_close_input_stream
(
format_context
);
#endif
mpd_ffmpeg_stream_close
(
stream
);
return
;
}
...
...
@@ -453,7 +463,11 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
int
audio_stream
=
ffmpeg_find_audio_stream
(
format_context
);
if
(
audio_stream
==
-
1
)
{
g_warning
(
"No audio stream inside
\n
"
);
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
avformat_close_input
(
&
format_context
);
#else
av_close_input_stream
(
format_context
);
#endif
mpd_ffmpeg_stream_close
(
stream
);
return
;
}
...
...
@@ -468,7 +482,11 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
if
(
!
codec
)
{
g_warning
(
"Unsupported audio codec
\n
"
);
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
avformat_close_input
(
&
format_context
);
#else
av_close_input_stream
(
format_context
);
#endif
mpd_ffmpeg_stream_close
(
stream
);
return
;
}
...
...
@@ -481,7 +499,11 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
codec_context
->
channels
,
&
error
))
{
g_warning
(
"%s"
,
error
->
message
);
g_error_free
(
error
);
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
avformat_close_input
(
&
format_context
);
#else
av_close_input_stream
(
format_context
);
#endif
mpd_ffmpeg_stream_close
(
stream
);
return
;
}
...
...
@@ -498,7 +520,11 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
#endif
if
(
open_result
<
0
)
{
g_warning
(
"Could not open codec
\n
"
);
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
avformat_close_input
(
&
format_context
);
#else
av_close_input_stream
(
format_context
);
#endif
mpd_ffmpeg_stream_close
(
stream
);
return
;
}
...
...
@@ -542,7 +568,11 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
}
while
(
cmd
!=
DECODE_COMMAND_STOP
);
avcodec_close
(
codec_context
);
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
avformat_close_input
(
&
format_context
);
#else
av_close_input_stream
(
format_context
);
#endif
mpd_ffmpeg_stream_close
(
stream
);
}
...
...
@@ -618,8 +648,18 @@ ffmpeg_stream_tag(struct input_stream *is)
return
NULL
;
}
if
(
av_find_stream_info
(
f
)
<
0
)
{
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,2,0)
const
int
find_result
=
avformat_find_stream_info
(
f
,
NULL
);
#else
const
int
find_result
=
av_find_stream_info
(
f
);
#endif
if
(
find_result
<
0
)
{
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
avformat_close_input
(
&
f
);
#else
av_close_input_stream
(
f
);
#endif
mpd_ffmpeg_stream_close
(
stream
);
return
NULL
;
}
...
...
@@ -667,7 +707,11 @@ ffmpeg_stream_tag(struct input_stream *is)
#endif
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
avformat_close_input
(
&
f
);
#else
av_close_input_stream
(
f
);
#endif
mpd_ffmpeg_stream_close
(
stream
);
return
tag
;
...
...
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