OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3646ef6
)
avformat/utils: Do not detect video codecs when audio is expected
author
Michael Niedermayer
<michael@niedermayer.cc>
Wed, 4 May 2016 19:31:18 +0000
(21:31 +0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Wed, 4 May 2016 20:19:44 +0000
(22:19 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/utils.c
patch
|
blob
|
history
diff --git
a/libavformat/utils.c
b/libavformat/utils.c
index
72396af
..
52395d4
100644
(file)
--- a/
libavformat/utils.c
+++ b/
libavformat/utils.c
@@
-315,6
+315,9
@@
static int set_codec_from_probe_data(AVFormatContext *s, AVStream *st,
fmt->name, score);
for (i = 0; fmt_id_type[i].name; i++) {
if (!strcmp(fmt->name, fmt_id_type[i].name)) {
+ if (fmt_id_type[i].type != AVMEDIA_TYPE_AUDIO &&
+ st->codecpar->sample_rate)
+ continue;
st->codecpar->codec_id = fmt_id_type[i].id;
st->codecpar->codec_type = fmt_id_type[i].type;
st->internal->need_context_update = 1;