[Ffmpeg-cvslog] r7814 - trunk/libavcodec/vc1.c
kostya
subversion
Sun Feb 4 11:45:01 CET 2007
Author: kostya
Date: Sun Feb 4 11:45:01 2007
New Revision: 7814
Modified:
trunk/libavcodec/vc1.c
Log:
Set frame rate from extradata
Modified: trunk/libavcodec/vc1.c
==============================================================================
--- trunk/libavcodec/vc1.c (original)
+++ trunk/libavcodec/vc1.c Sun Feb 4 11:45:01 2007
@@ -1320,10 +1320,16 @@
if(get_bits1(gb)){ //framerate stuff
if(get_bits1(gb)) {
- get_bits(gb, 16);
+ v->s.avctx->time_base.num = 32;
+ v->s.avctx->time_base.den = get_bits(gb, 16) + 1;
} else {
- get_bits(gb, 8);
- get_bits(gb, 4);
+ int nr, dr;
+ nr = get_bits(gb, 8);
+ dr = get_bits(gb, 4);
+ if(nr && nr < 8 && dr && dr < 3){
+ v->s.avctx->time_base.num = fps_dr[dr - 1];
+ v->s.avctx->time_base.den = fps_nr[nr - 1] * 1000;
+ }
}
}
More information about the ffmpeg-cvslog
mailing list