Mercurial > libavformat.hg
comparison utils.c @ 5653:25eca7e2cf64 libavformat
Add flag so muxers not needing width/height can signal this.
Add this flag to img2 (fixes -vcodec copy to image2 in some cases)
author | michael |
---|---|
date | Fri, 12 Feb 2010 20:35:29 +0000 |
parents | 7309cd6645b6 |
children | 6d530eb42996 |
comparison
equal
deleted
inserted
replaced
5652:7878a002f87d | 5653:25eca7e2cf64 |
---|---|
2544 case CODEC_TYPE_VIDEO: | 2544 case CODEC_TYPE_VIDEO: |
2545 if(st->codec->time_base.num<=0 || st->codec->time_base.den<=0){ //FIXME audio too? | 2545 if(st->codec->time_base.num<=0 || st->codec->time_base.den<=0){ //FIXME audio too? |
2546 av_log(s, AV_LOG_ERROR, "time base not set\n"); | 2546 av_log(s, AV_LOG_ERROR, "time base not set\n"); |
2547 return -1; | 2547 return -1; |
2548 } | 2548 } |
2549 if(st->codec->width<=0 || st->codec->height<=0){ | 2549 if((st->codec->width<=0 || st->codec->height<=0) && !(s->oformat->flags & AVFMT_NODIMENSIONS)){ |
2550 av_log(s, AV_LOG_ERROR, "dimensions not set\n"); | 2550 av_log(s, AV_LOG_ERROR, "dimensions not set\n"); |
2551 return -1; | 2551 return -1; |
2552 } | 2552 } |
2553 if(av_cmp_q(st->sample_aspect_ratio, st->codec->sample_aspect_ratio)){ | 2553 if(av_cmp_q(st->sample_aspect_ratio, st->codec->sample_aspect_ratio)){ |
2554 av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between encoder and muxer layer\n"); | 2554 av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between encoder and muxer layer\n"); |