comparison utils.c @ 3929:e0eb33b98f43 libavformat

Ensure that muxer and encoder aspect ratios match. So no invalid files are generated.
author michael
date Fri, 19 Sep 2008 12:37:38 +0000
parents 45dfe99dced8
children a324a7aa8a5b
comparison
equal deleted inserted replaced
3928:2768ffe4332b 3929:e0eb33b98f43
2455 } 2455 }
2456 if(st->codec->width<=0 || st->codec->height<=0){ 2456 if(st->codec->width<=0 || st->codec->height<=0){
2457 av_log(s, AV_LOG_ERROR, "dimensions not set\n"); 2457 av_log(s, AV_LOG_ERROR, "dimensions not set\n");
2458 return -1; 2458 return -1;
2459 } 2459 }
2460 if(av_cmp_q(st->sample_aspect_ratio, st->codec->sample_aspect_ratio)){
2461 av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between encoder and muxer layer\n");
2462 return -1;
2463 }
2460 break; 2464 break;
2461 } 2465 }
2462 2466
2463 if(s->oformat->codec_tag){ 2467 if(s->oformat->codec_tag){
2464 if(st->codec->codec_tag){ 2468 if(st->codec->codec_tag){