[FFmpeg-cvslog] r15631 - trunk/libavformat/raw.c

michael subversion
Sat Oct 18 12:40:31 CEST 2008


Author: michael
Date: Sat Oct 18 12:40:31 2008
New Revision: 15631

Log:
Assume mono if no other information for raw.
Should fix issue687


Modified:
   trunk/libavformat/raw.c

Modified: trunk/libavformat/raw.c
==============================================================================
--- trunk/libavformat/raw.c	(original)
+++ trunk/libavformat/raw.c	Sat Oct 18 12:40:31 2008
@@ -113,7 +113,8 @@ static int raw_read_header(AVFormatConte
         switch(st->codec->codec_type) {
         case CODEC_TYPE_AUDIO:
             st->codec->sample_rate = ap->sample_rate;
-            st->codec->channels = ap->channels;
+            if(ap->channels) st->codec->channels = ap->channels;
+            else             st->codec->channels = 1;
             av_set_pts_info(st, 64, 1, st->codec->sample_rate);
             break;
         case CODEC_TYPE_VIDEO:




More information about the ffmpeg-cvslog mailing list