[vlc-commits] modules: convert to seconds using SEC_FROM_VLC_TICK()
Steve Lhomme
git at videolan.org
Thu Sep 20 16:16:01 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Sep 20 13:36:09 2018 +0200| [3556bcd09b2487099e96d1cbbe4cf7862bfd1739] | committer: Steve Lhomme
modules: convert to seconds using SEC_FROM_VLC_TICK()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3556bcd09b2487099e96d1cbbe4cf7862bfd1739
---
modules/demux/playlist/asx.c | 4 ++--
modules/misc/audioscrobbler.c | 2 +-
modules/mux/avi.c | 2 +-
modules/mux/mp4/libmp4mux.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/demux/playlist/asx.c b/modules/demux/playlist/asx.c
index 55df14eb04..e1452f17a3 100644
--- a/modules/demux/playlist/asx.c
+++ b/modules/demux/playlist/asx.c
@@ -298,14 +298,14 @@ static void ProcessEntry( int *pi_n_entry, xml_reader_t *p_xml_reader,
if( i_start )
{
if( asprintf( ppsz_options, ":start-time=%"PRId64 ,
- i_start / CLOCK_FREQ ) != -1)
+ SEC_FROM_VLC_TICK(i_start) ) != -1)
i_options++;
}
if( i_duration)
{
if( asprintf( ppsz_options + i_options,
":stop-time=%"PRId64,
- (i_start + i_duration) / CLOCK_FREQ ) != -1)
+ SEC_FROM_VLC_TICK(i_start + i_duration) ) != -1)
i_options++;
}
diff --git a/modules/misc/audioscrobbler.c b/modules/misc/audioscrobbler.c
index f6194492c9..5e295d151b 100644
--- a/modules/misc/audioscrobbler.c
+++ b/modules/misc/audioscrobbler.c
@@ -198,7 +198,7 @@ static void ReadMetaData(intf_thread_t *p_this, input_thread_t *p_input)
ALLOC_ITEM_META(p_sys->p_current_song.psz_m, TrackID);
ALLOC_ITEM_META(p_sys->p_current_song.psz_n, TrackNum);
- p_sys->p_current_song.i_l = input_item_GetDuration(p_item) / CLOCK_FREQ;
+ p_sys->p_current_song.i_l = SEC_FROM_VLC_TICK(input_item_GetDuration(p_item));
#undef ALLOC_ITEM_META
diff --git a/modules/mux/avi.c b/modules/mux/avi.c
index 3b1994295d..d84347447f 100644
--- a/modules/mux/avi.c
+++ b/modules/mux/avi.c
@@ -244,7 +244,7 @@ static void Close( vlc_object_t * p_this )
msg_Info( p_mux, "stream[%d] duration:%"PRId64" totalsize:%"PRId64
" frames:%d fps:%f KiB/s:%d",
i_stream,
- (int64_t)p_stream->i_duration / CLOCK_FREQ,
+ SEC_FROM_VLC_TICK(p_stream->i_duration),
p_stream->i_totalsize,
p_stream->i_frames,
p_stream->f_fps, p_stream->i_bitrate/1024 );
diff --git a/modules/mux/mp4/libmp4mux.c b/modules/mux/mp4/libmp4mux.c
index 92e7b1fe32..217a338e0a 100644
--- a/modules/mux/mp4/libmp4mux.c
+++ b/modules/mux/mp4/libmp4mux.c
@@ -1422,7 +1422,7 @@ bo_t * mp4mux_GetMoovBox(vlc_object_t *p_obj, mp4mux_trackinfo_t **pp_tracks, un
i_duration = __MAX(i_duration, p_stream->i_read_duration);
}
if(p_obj)
- msg_Dbg(p_obj, "movie duration %"PRId64"s", i_duration / CLOCK_FREQ);
+ msg_Dbg(p_obj, "movie duration %"PRId64"s", SEC_FROM_VLC_TICK(i_duration));
}
int64_t i_movie_duration = i_duration * i_movie_timescale / CLOCK_FREQ;
More information about the vlc-commits
mailing list