aboutsummaryrefslogtreecommitdiff
path: root/libavformat/sol.c
diff options
context:
space:
mode:
authorJustin Ruggles2012-04-07 18:38:29 -0400
committerJustin Ruggles2012-11-12 10:33:22 -0500
commit1c7587728c81fcb8209ae079a1bc0ccc6b03b4c2 (patch)
tree40d361a9377c946616792722c089c68ecfa7b1ac /libavformat/sol.c
parentbfccd76adb514f6bf3dd4bf7f429ca58000f513e (diff)
sol: set channel layout
Diffstat (limited to 'libavformat/sol.c')
-rw-r--r--libavformat/sol.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/sol.c b/libavformat/sol.c
index da846002e8..92599b163d 100644
--- a/libavformat/sol.c
+++ b/libavformat/sol.c
@@ -23,6 +23,7 @@
* Based on documents from Game Audio Player and own research
*/
+#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "internal.h"
@@ -116,6 +117,8 @@ static int sol_read_header(AVFormatContext *s)
st->codec->codec_tag = id;
st->codec->codec_id = codec;
st->codec->channels = channels;
+ st->codec->channel_layout = channels == 1 ? AV_CH_LAYOUT_MONO :
+ AV_CH_LAYOUT_STEREO;
st->codec->sample_rate = rate;
avpriv_set_pts_info(st, 64, 1, rate);
return 0;