Commit 5beb50f2 authored by Mark Moriarty's avatar Mark Moriarty

reintroduce nearbyint, but use the 1001 multiplier. adding 0.5 wasn't...

reintroduce nearbyint, but use the 1001 multiplier.  adding 0.5 wasn't transforming 29.97 fps properly, and the earlier nearbyint was a hack for mpeg1/2.  the preceding mods were all partially right, partially wrong -- needed to combine the two change concepts. 
parent ce1d1aeb
......@@ -27,6 +27,7 @@
*****************************************************************************/
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <vlc/vlc.h>
#include <vlc/input.h>
......@@ -672,7 +673,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
if( p_sys->f_fps > 0 )
{
id->p_encoder->fmt_out.video.i_frame_rate =
p_sys->f_fps * 1001 + 0.5;
nearbyint(p_sys->f_fps * 1001);
id->p_encoder->fmt_out.video.i_frame_rate_base = 1001;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment