[FFmpeg-cvslog] idcin: set channel_layout
Justin Ruggles
git at videolan.org
Thu Jan 10 12:45:05 CET 2013
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Wed Aug 1 15:59:12 2012 -0400| [4b840930da7cb45f12d6592244ddbb57b99c2ae1] | committer: Justin Ruggles
idcin: set channel_layout
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4b840930da7cb45f12d6592244ddbb57b99c2ae1
---
libavformat/idcin.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/idcin.c b/libavformat/idcin.c
index aa196c8..1c436f7 100644
--- a/libavformat/idcin.c
+++ b/libavformat/idcin.c
@@ -68,6 +68,7 @@
* transmitting them to the video decoder
*/
+#include "libavutil/audioconvert.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
@@ -204,6 +205,8 @@ static int idcin_read_header(AVFormatContext *s)
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_tag = 1;
st->codec->channels = channels;
+ st->codec->channel_layout = channels > 1 ? AV_CH_LAYOUT_STEREO :
+ AV_CH_LAYOUT_MONO;
st->codec->sample_rate = sample_rate;
st->codec->bits_per_coded_sample = bytes_per_sample * 8;
st->codec->bit_rate = sample_rate * bytes_per_sample * 8 * channels;
More information about the ffmpeg-cvslog
mailing list