OSDN Git Service
(root)
/
coroid
/
ffmpeg_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
168f9e8
)
If AVCodecContext.channels is 0 and AVCodecContext.channel_layout is
author
Justin Ruggles
<justin.ruggles@gmail.com>
Tue, 19 Apr 2011 23:03:47 +0000
(19:03 -0400)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Wed, 27 Apr 2011 16:57:43 +0000
(12:57 -0400)
non-zero, set channels based on channel_layout.
This allows the user to set only channel_layout and not channels.
libavcodec/utils.c
patch
|
blob
|
history
diff --git
a/libavcodec/utils.c
b/libavcodec/utils.c
index
e4ea1e5
..
6844188
100644
(file)
--- a/
libavcodec/utils.c
+++ b/
libavcodec/utils.c
@@
-584,6
+584,8
@@
int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
ret = AVERROR(EINVAL);
goto free_and_end;
}
+ } else if (avctx->channel_layout) {
+ avctx->channels = av_get_channel_layout_nb_channels(avctx->channel_layout);
}
}