Mercurial > mplayer.hg
comparison mencoder.c @ 25966:28316f2f8d26
Try to make fps float -> AVRational conversion work better.
Might make sense to change this once we at least use double for
fps everywhere.
author | reimar |
---|---|
date | Thu, 14 Feb 2008 17:38:52 +0000 |
parents | 4cd12675cfbb |
children | 429c8f64b810 |
comparison
equal
deleted
inserted
replaced
25965:4cd12675cfbb | 25966:28316f2f8d26 |
---|---|
762 mux_v->source=sh_video; | 762 mux_v->source=sh_video; |
763 | 763 |
764 mux_v->h.dwSampleSize=0; // VBR | 764 mux_v->h.dwSampleSize=0; // VBR |
765 #ifdef USE_LIBAVCODEC | 765 #ifdef USE_LIBAVCODEC |
766 { | 766 { |
767 AVRational q= av_d2q(force_ofps?force_ofps:sh_video->fps*playback_speed, 60000); | 767 double fps = force_ofps?force_ofps:sh_video->fps*playback_speed; |
768 AVRational q= av_d2q(fps, fps*1001+2); | |
768 mux_v->h.dwScale= q.den; | 769 mux_v->h.dwScale= q.den; |
769 mux_v->h.dwRate = q.num; | 770 mux_v->h.dwRate = q.num; |
770 } | 771 } |
771 #else | 772 #else |
772 mux_v->h.dwScale=10000; | 773 mux_v->h.dwScale=10000; |