[FFmpeg-cvslog] ra288dec: set channel layout

Justin Ruggles git at videolan.org
Fri Nov 2 14:32:42 CET 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Tue Oct 23 00:35:50 2012 -0400| [4e13e50432bd1c1a89f626f8196b55a0302c8f19] | committer: Justin Ruggles

ra288dec: set channel layout

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

 libavcodec/ra288.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index 1d02c7b..e080d2b 100644
--- a/libavcodec/ra288.c
+++ b/libavcodec/ra288.c
@@ -19,6 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/audioconvert.h"
 #include "libavutil/float_dsp.h"
 #include "avcodec.h"
 #define BITSTREAM_READER_LE
@@ -61,7 +62,11 @@ typedef struct {
 static av_cold int ra288_decode_init(AVCodecContext *avctx)
 {
     RA288Context *ractx = avctx->priv_data;
-    avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
+
+    avctx->channels       = 1;
+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
+    avctx->sample_fmt     = AV_SAMPLE_FMT_FLT;
+
     avpriv_float_dsp_init(&ractx->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
 
     avcodec_get_frame_defaults(&ractx->frame);



More information about the ffmpeg-cvslog mailing list