comparison h264.c @ 2440:cf97353f94c6 libavcodec

div by zero aspect fix
author michael
date Wed, 19 Jan 2005 13:24:43 +0000
parents 18b8b2dcc037
children 358813ec4ca2
comparison
equal deleted inserted replaced
2439:6684c0e9e28f 2440:cf97353f94c6
3467 alloc_tables(h); 3467 alloc_tables(h);
3468 3468
3469 s->avctx->width = s->width; 3469 s->avctx->width = s->width;
3470 s->avctx->height = s->height; 3470 s->avctx->height = s->height;
3471 s->avctx->sample_aspect_ratio= h->sps.sar; 3471 s->avctx->sample_aspect_ratio= h->sps.sar;
3472 if(!s->avctx->sample_aspect_ratio.den)
3473 s->avctx->sample_aspect_ratio.den = 1;
3472 3474
3473 if(h->sps.timing_info_present_flag && h->sps.fixed_frame_rate_flag){ 3475 if(h->sps.timing_info_present_flag && h->sps.fixed_frame_rate_flag){
3474 s->avctx->frame_rate = h->sps.time_scale; 3476 s->avctx->frame_rate = h->sps.time_scale;
3475 s->avctx->frame_rate_base = h->sps.num_units_in_tick; 3477 s->avctx->frame_rate_base = h->sps.num_units_in_tick;
3476 } 3478 }