comparison riff.c @ 1805:2c2e787782bb libavformat

warn if bps from user and what will be stored missmatches
author michael
date Tue, 20 Feb 2007 16:20:08 +0000
parents f05a4a9b1d19
children d431b26ff5ef
comparison
equal deleted inserted replaced
1804:302115721ef5 1805:2c2e787782bb
315 } else if (enc->codec_id == CODEC_ID_PCM_S32LE) { 315 } else if (enc->codec_id == CODEC_ID_PCM_S32LE) {
316 bps = 32; 316 bps = 32;
317 } else { 317 } else {
318 bps = 16; 318 bps = 16;
319 } 319 }
320 if(bps != enc->bits_per_sample){
321 av_log(enc, AV_LOG_WARNING, "requested bits_per_sample (%d) and actually stored (%d) differ\n", enc->bits_per_sample, bps);
322 }
320 323
321 if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3 || enc->codec_id == CODEC_ID_GSM_MS) { 324 if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3 || enc->codec_id == CODEC_ID_GSM_MS) {
322 blkalign = enc->frame_size; //this is wrong, but seems many demuxers dont work if this is set correctly 325 blkalign = enc->frame_size; //this is wrong, but seems many demuxers dont work if this is set correctly
323 //blkalign = 144 * enc->bit_rate/enc->sample_rate; 326 //blkalign = 144 * enc->bit_rate/enc->sample_rate;
324 } else if (enc->codec_id == CODEC_ID_ADPCM_G726) { // 327 } else if (enc->codec_id == CODEC_ID_ADPCM_G726) { //