[Ffmpeg-cvslog] CVS: ffmpeg/libavformat utils.c,1.142,1.143
Michael Niedermayer CVS
michael
Fri May 6 22:26:52 CEST 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv29222
Modified Files:
utils.c
Log Message:
prefer container time_base for frame duration guess
Index: utils.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/utils.c,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -d -r1.142 -r1.143
--- utils.c 30 Apr 2005 21:43:59 -0000 1.142
+++ utils.c 6 May 2005 20:26:50 -0000 1.143
@@ -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:
More information about the ffmpeg-cvslog
mailing list