comparison vc1.c @ 4470:2c9a66c5223a libavcodec

Set frame rate from extradata
author kostya
date Sun, 04 Feb 2007 10:45:01 +0000
parents a9f64d2a2e69
children cfbd1f3d457c
comparison
equal deleted inserted replaced
4469:a2e82396193c 4470:2c9a66c5223a
1318 v->s.avctx->sample_aspect_ratio = (AVRational){w, h}; 1318 v->s.avctx->sample_aspect_ratio = (AVRational){w, h};
1319 } 1319 }
1320 1320
1321 if(get_bits1(gb)){ //framerate stuff 1321 if(get_bits1(gb)){ //framerate stuff
1322 if(get_bits1(gb)) { 1322 if(get_bits1(gb)) {
1323 get_bits(gb, 16); 1323 v->s.avctx->time_base.num = 32;
1324 v->s.avctx->time_base.den = get_bits(gb, 16) + 1;
1324 } else { 1325 } else {
1325 get_bits(gb, 8); 1326 int nr, dr;
1326 get_bits(gb, 4); 1327 nr = get_bits(gb, 8);
1328 dr = get_bits(gb, 4);
1329 if(nr && nr < 8 && dr && dr < 3){
1330 v->s.avctx->time_base.num = fps_dr[dr - 1];
1331 v->s.avctx->time_base.den = fps_nr[nr - 1] * 1000;
1332 }
1327 } 1333 }
1328 } 1334 }
1329 1335
1330 if(get_bits1(gb)){ 1336 if(get_bits1(gb)){
1331 v->color_prim = get_bits(gb, 8); 1337 v->color_prim = get_bits(gb, 8);