summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/sol.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/sol.c b/libavformat/sol.c
index 42498492b6..b92cfb36fe 100644
--- a/libavformat/sol.c
+++ b/libavformat/sol.c
@@ -113,9 +113,7 @@ static int sol_read_header(AVFormatContext *s)
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_tag = id;
st->codecpar->codec_id = codec;
- st->codecpar->channels = channels;
- st->codecpar->channel_layout = channels == 1 ? AV_CH_LAYOUT_MONO :
- AV_CH_LAYOUT_STEREO;
+ av_channel_layout_default(&st->codecpar->ch_layout,channels);
st->codecpar->sample_rate = rate;
avpriv_set_pts_info(st, 64, 1, rate);
return 0;