diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-08-01 15:59:12 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2013-01-09 14:49:06 -0500 |
commit | 4b840930da7cb45f12d6592244ddbb57b99c2ae1 (patch) | |
tree | 5e7c0a8056e62824ff6acd26b5148fd5181df726 | |
parent | 12c2530b1d87fa94f81ea97df575b77c825e6f4f (diff) | |
download | ffmpeg-4b840930da7cb45f12d6592244ddbb57b99c2ae1.tar.gz |
idcin: set channel_layout
-rw-r--r-- | libavformat/idcin.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/idcin.c b/libavformat/idcin.c index aa196c8b49..1c436f7cf6 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; |