div by zero aspect fix

Originally committed as revision 3850 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2005-01-19 13:24:43 +00:00
parent 895345da9a
commit eed4ebd22c
1 changed files with 2 additions and 0 deletions

View File

@ -3469,6 +3469,8 @@ static int decode_slice_header(H264Context *h){
s->avctx->width = s->width;
s->avctx->height = s->height;
s->avctx->sample_aspect_ratio= h->sps.sar;
if(!s->avctx->sample_aspect_ratio.den)
s->avctx->sample_aspect_ratio.den = 1;
if(h->sps.timing_info_present_flag && h->sps.fixed_frame_rate_flag){
s->avctx->frame_rate = h->sps.time_scale;