changeset 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 4d5d9ac28e21
children 41f9a32e9516
files raw.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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: