Mercurial > libavformat.hg
diff flvdec.c @ 620:7dbdbe073bcd libavformat
try to guess the fps if they are variable
author | michael |
---|---|
date | Sun, 19 Dec 2004 01:23:22 +0000 |
parents | 256f7b271bdc |
children | b47948262721 |
line wrap: on
line diff
--- a/flvdec.c Fri Dec 17 19:23:53 2004 +0000 +++ b/flvdec.c Sun Dec 19 01:23:22 2004 +0000 @@ -103,7 +103,8 @@ return AVERROR_NOMEM; av_set_pts_info(st, 24, 1, 1000); /* 24 bit pts in ms */ - st->codec.frame_rate_base= 0; + st->codec.frame_rate_base= 1; + st->codec.frame_rate= 1000; } break; } @@ -123,19 +124,12 @@ } } }else{ - if(st->codec.frame_rate_base == 0){ st->codec.codec_type = CODEC_TYPE_VIDEO; - //guess the frame rate - if(pts){ - st->codec.frame_rate_base=1; - st->codec.frame_rate= (1000 + pts/2)/pts; - } switch(flags & 0xF){ case 2: st->codec.codec_id = CODEC_ID_FLV1; break; default: st->codec.codec_tag= flags & 0xF; } - } } if (av_new_packet(pkt, size) < 0)