Mercurial > libavcodec.hg
comparison mpeg12.c @ 2658:d1609cfeb1d0 libavcodec
#defines for strict_std_compliance and split between inofficial extensions and non standarized things
author | michael |
---|---|
date | Sun, 08 May 2005 20:15:42 +0000 |
parents | ef44d24680d1 |
children | 8e9afac9896b |
comparison
equal
deleted
inserted
replaced
2657:24472383b36f | 2658:d1609cfeb1d0 |
---|---|
201 int64_t d; | 201 int64_t d; |
202 | 202 |
203 for(i=1;i<14;i++) { | 203 for(i=1;i<14;i++) { |
204 int64_t n0= 1001LL/frame_rate_tab[i].den*frame_rate_tab[i].num*s->avctx->time_base.num; | 204 int64_t n0= 1001LL/frame_rate_tab[i].den*frame_rate_tab[i].num*s->avctx->time_base.num; |
205 int64_t n1= 1001LL*s->avctx->time_base.den; | 205 int64_t n1= 1001LL*s->avctx->time_base.den; |
206 if(s->avctx->strict_std_compliance >= 0 && i>=9) break; | 206 if(s->avctx->strict_std_compliance > FF_COMPLIANCE_INOFFICIAL && i>=9) break; |
207 | 207 |
208 d = ABS(n0 - n1); | 208 d = ABS(n0 - n1); |
209 if(d < dmin){ | 209 if(d < dmin){ |
210 dmin=d; | 210 dmin=d; |
211 s->frame_rate_index= i; | 211 s->frame_rate_index= i; |
223 | 223 |
224 if(MPV_encode_init(avctx) < 0) | 224 if(MPV_encode_init(avctx) < 0) |
225 return -1; | 225 return -1; |
226 | 226 |
227 if(find_frame_rate_index(s) < 0){ | 227 if(find_frame_rate_index(s) < 0){ |
228 if(s->strict_std_compliance >=0){ | 228 if(s->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL){ |
229 av_log(avctx, AV_LOG_ERROR, "MPEG1/2 does not support %d/%d fps\n", avctx->time_base.den, avctx->time_base.num); | 229 av_log(avctx, AV_LOG_ERROR, "MPEG1/2 does not support %d/%d fps\n", avctx->time_base.den, avctx->time_base.num); |
230 return -1; | 230 return -1; |
231 }else{ | 231 }else{ |
232 av_log(avctx, AV_LOG_INFO, "MPEG1/2 does not support %d/%d fps, there may be AV sync issues\n", avctx->time_base.den, avctx->time_base.num); | 232 av_log(avctx, AV_LOG_INFO, "MPEG1/2 does not support %d/%d fps, there may be AV sync issues\n", avctx->time_base.den, avctx->time_base.num); |
233 } | 233 } |