summaryrefslogtreecommitdiff
path: root/libavformat/raw.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-10-18 10:40:31 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-10-18 10:40:31 +0000
commitbf9067cf3eba497d450b46d075dde93a90675539 (patch)
treea72afdec762dbc8932cb73e0c5a82f4b64a503f9 /libavformat/raw.c
parent357f45d9bc532180bde2204ff6f03adf881d12d5 (diff)
Assume mono if no other information for raw.
Should fix issue687 Originally committed as revision 15631 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/raw.c')
-rw-r--r--libavformat/raw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c
index 058e922931..6c6ea27ddf 100644
--- a/libavformat/raw.c
+++ b/libavformat/raw.c
@@ -113,7 +113,8 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
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: