vlc | branch: master | Ilkka Ollakka <[email protected]> | Sun Aug 9 19:07:42 2015 +0300| [7219c0cce6bff1c164b2034b363232cf20273b91] | committer: Ilkka Ollakka
avformat: use CLOCK_FREQ > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7219c0cce6bff1c164b2034b363232cf20273b91 --- modules/demux/avformat/demux.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c index 5480af7..8e227a7 100644 --- a/modules/demux/avformat/demux.c +++ b/modules/demux/avformat/demux.c @@ -739,7 +739,7 @@ static int Demux( demux_t *p_demux ) if( p_sys->ic->start_time != (int64_t)AV_NOPTS_VALUE ) { q = lldiv( p_sys->ic->start_time, AV_TIME_BASE); - i_start_time = q.quot * (int64_t)1000000 + q.rem * (int64_t)1000000 / AV_TIME_BASE; + i_start_time = q.quot * CLOCK_FREQ + q.rem * CLOCK_FREQ / AV_TIME_BASE; } else i_start_time = 0; @@ -749,8 +749,8 @@ static int Demux( demux_t *p_demux ) else { q = lldiv( pkt.dts, p_stream->time_base.den ); - p_frame->i_dts = q.quot * (int64_t)1000000 * - p_stream->time_base.num + q.rem * (int64_t)1000000 * + p_frame->i_dts = q.quot * CLOCK_FREQ * + p_stream->time_base.num + q.rem * CLOCK_FREQ * p_stream->time_base.num / p_stream->time_base.den - i_start_time + VLC_TS_0; } @@ -760,13 +760,13 @@ static int Demux( demux_t *p_demux ) else { q = lldiv( pkt.pts, p_stream->time_base.den ); - p_frame->i_pts = q.quot * (int64_t)1000000 * - p_stream->time_base.num + q.rem * (int64_t)1000000 * + p_frame->i_pts = q.quot * CLOCK_FREQ * + p_stream->time_base.num + q.rem * CLOCK_FREQ * p_stream->time_base.num / p_stream->time_base.den - i_start_time + VLC_TS_0; } if( pkt.duration > 0 && p_frame->i_length <= 0 ) - p_frame->i_length = pkt.duration * INT64_C(1000000) * + p_frame->i_length = pkt.duration * CLOCK_FREQ * p_stream->time_base.num / p_stream->time_base.den; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
