Mercurial > libavformat.hg
changeset 747:95c9cef3c3db libavformat
prefer container time_base for frame duration guess
author | michael |
---|---|
date | Fri, 06 May 2005 20:26:50 +0000 |
parents | 5f07cc45fd50 |
children | 6bd8b2955534 |
files | utils.c |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Fri May 06 16:14:29 2005 +0000 +++ b/utils.c Fri May 06 20:26:50 2005 +0000 @@ -632,16 +632,16 @@ *pden = 0; switch(st->codec.codec_type) { case CODEC_TYPE_VIDEO: - if(st->codec.time_base.num*1000 <= st->codec.time_base.den){ + if(st->time_base.num*1000 > st->time_base.den){ *pnum = st->time_base.num; *pden = st->time_base.den; - }else{ + }else if(st->codec.time_base.num*1000 > st->codec.time_base.den){ *pnum = st->codec.time_base.num; *pden = st->codec.time_base.den; - } - if (pc && pc->repeat_pict) { - *pden *= 2; - *pnum = (*pnum) * (2 + pc->repeat_pict); + if (pc && pc->repeat_pict) { + *pden *= 2; + *pnum = (*pnum) * (2 + pc->repeat_pict); + } } break; case CODEC_TYPE_AUDIO: