Mercurial > libavformat.hg
comparison riff.c @ 3345:8947d86e480b libavformat
Make ac3 in avi work better.
fixes issue355.
author | michael |
---|---|
date | Mon, 26 May 2008 00:05:30 +0000 |
parents | 6f61c3b36632 |
children | f615c35681cf |
comparison
equal
deleted
inserted
replaced
3344:f5b6c915f991 | 3345:8947d86e480b |
---|---|
255 } | 255 } |
256 if(bps != enc->bits_per_sample && enc->bits_per_sample){ | 256 if(bps != enc->bits_per_sample && enc->bits_per_sample){ |
257 av_log(enc, AV_LOG_WARNING, "requested bits_per_sample (%d) and actually stored (%d) differ\n", enc->bits_per_sample, bps); | 257 av_log(enc, AV_LOG_WARNING, "requested bits_per_sample (%d) and actually stored (%d) differ\n", enc->bits_per_sample, bps); |
258 } | 258 } |
259 | 259 |
260 if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3 || enc->codec_id == CODEC_ID_GSM_MS) { | 260 if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3 || enc->codec_id == CODEC_ID_GSM_MS || enc->codec_id == CODEC_ID_AC3) { |
261 blkalign = enc->frame_size; //this is wrong, but it seems many demuxers do not work if this is set correctly | 261 blkalign = enc->frame_size; //this is wrong, but it seems many demuxers do not work if this is set correctly |
262 //blkalign = 144 * enc->bit_rate/enc->sample_rate; | 262 //blkalign = 144 * enc->bit_rate/enc->sample_rate; |
263 } else if (enc->codec_id == CODEC_ID_ADPCM_G726) { // | 263 } else if (enc->codec_id == CODEC_ID_ADPCM_G726) { // |
264 blkalign = 1; | 264 blkalign = 1; |
265 } else if (enc->block_align != 0) { /* specified by the codec */ | 265 } else if (enc->block_align != 0) { /* specified by the codec */ |