diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-02-10 14:12:26 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-02-10 14:12:26 +0000 |
commit | fccc9cf57d0283975a84f9c4f49069f1710bf1b2 (patch) | |
tree | 021de3ea5a6cd92b3a1406bf7f5a33dd148b31cb | |
parent | 3c7d558c03cab230bb769d5990cce15e626cc82c (diff) | |
download | mpv-fccc9cf57d0283975a84f9c4f49069f1710bf1b2.tar.bz2 mpv-fccc9cf57d0283975a84f9c4f49069f1710bf1b2.tar.xz |
use libavcodecs float -> fraction conversation if available for -ofps, that way exact framerates like 24000/1001 are possible instead of ending up with x/10000
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11947 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | mencoder.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mencoder.c b/mencoder.c index c376a83f01..34f0167aac 100644 --- a/mencoder.c +++ b/mencoder.c @@ -627,8 +627,16 @@ mux_v->buffer=malloc(mux_v->buffer_size); mux_v->source=sh_video; mux_v->h.dwSampleSize=0; // VBR +#ifdef USE_LIBAVCODEC +{ + AVRational q= av_d2q(force_ofps?force_ofps:sh_video->fps, 30000); + mux_v->h.dwScale= q.den; + mux_v->h.dwRate = q.num; +} +#else mux_v->h.dwScale=10000; mux_v->h.dwRate=mux_v->h.dwScale*(force_ofps?force_ofps:sh_video->fps); +#endif mux_v->codec=out_video_codec; |