vlc/vlc-3.0 | branch: master | Zhao Zhili <[email protected]> | Sat Aug 4 00:36:13 2018 +0800| [682c12e08530c35432092f4e8289465b302d5f0c] | committer: Francois Cartegnie
demux: h26x: fix frame duration Signed-off-by: Jean-Baptiste Kempf <[email protected]> (cherry picked from commit f3df4c38e174563a8bf1c42bac8a8e68dd32e0c0) > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=682c12e08530c35432092f4e8289465b302d5f0c --- modules/demux/mpeg/h26x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/demux/mpeg/h26x.c b/modules/demux/mpeg/h26x.c index adf0702344..eda3e52920 100644 --- a/modules/demux/mpeg/h26x.c +++ b/modules/demux/mpeg/h26x.c @@ -481,8 +481,8 @@ static int Demux( demux_t *p_demux) unsigned i_nb_fields; if( i_frame_length > 0 ) { - i_nb_fields = i_frame_length * 2 * p_sys->frame_rate_num / - ( p_sys->frame_rate_den * CLOCK_FREQ ); + i_nb_fields = round( (double)i_frame_length * 2 * p_sys->frame_rate_num / + ( p_sys->frame_rate_den * CLOCK_FREQ ) ); } else i_nb_fields = 2; if( i_nb_fields <= 6 ) /* in the legit range */ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
