Skip to content

Commit

Permalink
use libavcodecs float -> fraction conversation if available for -ofps…
Browse files Browse the repository at this point in the history
…, 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
  • Loading branch information
michael committed Feb 10, 2004
1 parent 3c7d558 commit fccc9cf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mencoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit fccc9cf

Please sign in to comment.