Ticket #509: mythtv_badfps.patch
File mythtv_badfps.patch, 1.2 KB (added by , 19 years ago) |
---|
-
libs/libavcodec/h263.c
5560 5560 if (get_bits1(gb) != 0) { /* fixed_vop_rate */ 5561 5561 s->avctx->time_base.num = get_bits(gb, s->time_increment_bits); 5562 5562 }else 5563 s->avctx->time_base.num = 1;5563 s->avctx->time_base.num = s->avctx->time_base.den>10000?1001:1; 5564 5564 5565 5565 s->t_frame=0; 5566 5566 -
libs/libmythtv/avformatdecoder.cpp
680 709 fps = 1 / av_q2d(enc->time_base); 681 710 // Some formats report fps waaay too high. (wrong time_base) 682 711 if (fps > 100) 683 fps /= 100; 712 { 713 if (enc->time_base.den > 10000 && enc->time_base.num==1) 714 { 715 enc->time_base.num = 1001; // seems pretty standard 716 fps = 1 / av_q2d(enc->time_base); 717 } 718 while (fps > 100) 719 fps /= 10; // just for fun so its in range 720 } 684 721 685 722 float aspect_ratio; 686 723 if (enc->sample_aspect_ratio.num == 0)