Commit 4b840930 authored by Justin Ruggles's avatar Justin Ruggles

idcin: set channel_layout

parent 12c2530b
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
* transmitting them to the video decoder * transmitting them to the video decoder
*/ */
#include "libavutil/audioconvert.h"
#include "libavutil/imgutils.h" #include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h" #include "libavutil/intreadwrite.h"
#include "avformat.h" #include "avformat.h"
...@@ -204,6 +205,8 @@ static int idcin_read_header(AVFormatContext *s) ...@@ -204,6 +205,8 @@ static int idcin_read_header(AVFormatContext *s)
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_tag = 1; st->codec->codec_tag = 1;
st->codec->channels = channels; 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->sample_rate = sample_rate;
st->codec->bits_per_coded_sample = bytes_per_sample * 8; st->codec->bits_per_coded_sample = bytes_per_sample * 8;
st->codec->bit_rate = sample_rate * bytes_per_sample * 8 * channels; st->codec->bit_rate = sample_rate * bytes_per_sample * 8 * channels;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment