Mercurial > libavformat.hg
changeset 4125:df6989f6122b libavformat
Fix detection of audio codec in K70707-ARIA229.flv.
Fixes issue760.
author | michael |
---|---|
date | Sun, 21 Dec 2008 20:56:30 +0000 |
parents | c8318261427d |
children | bfc790ab375f |
files | flvdec.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flvdec.c Fri Dec 19 01:00:44 2008 +0000 +++ b/flvdec.c Sun Dec 21 20:56:30 2008 +0000 @@ -391,10 +391,12 @@ } if(is_audio){ - if(!st->codec->channels || !st->codec->sample_rate || !st->codec->bits_per_coded_sample || (!st->codec->codec_id && !st->codec->codec_tag)) { + if(!st->codec->channels || !st->codec->sample_rate || !st->codec->bits_per_coded_sample) { st->codec->channels = (flags & FLV_AUDIO_CHANNEL_MASK) == FLV_STEREO ? 2 : 1; st->codec->sample_rate = (44100 << ((flags & FLV_AUDIO_SAMPLERATE_MASK) >> FLV_AUDIO_SAMPLERATE_OFFSET) >> 3); st->codec->bits_per_coded_sample = (flags & FLV_AUDIO_SAMPLESIZE_MASK) ? 16 : 8; + } + if(!st->codec->codec_id){ flv_set_audio_codec(s, st, flags & FLV_AUDIO_CODECID_MASK); } }else{