[FFmpeg-cvslog] sol: set channel layout

Justin Ruggles git at videolan.org
Tue Nov 13 11:18:05 CET 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sat Apr  7 18:38:29 2012 -0400| [1c7587728c81fcb8209ae079a1bc0ccc6b03b4c2] | committer: Justin Ruggles

sol: set channel layout

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1c7587728c81fcb8209ae079a1bc0ccc6b03b4c2
---

 libavformat/sol.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/sol.c b/libavformat/sol.c
index da84600..92599b1 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;



More information about the ffmpeg-cvslog mailing list