diff raw.c @ 3995:fcff303d5c8c libavformat

Assume mono if no other information for raw. Should fix issue687
author michael
date Sat, 18 Oct 2008 10:40:31 +0000
parents 549a09cf23fe
children 677bcb3b65cd
line wrap: on
line diff
--- a/raw.c	Fri Oct 10 16:59:37 2008 +0000
+++ b/raw.c	Sat Oct 18 10:40:31 2008 +0000
@@ -113,7 +113,8 @@
         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: