Commit 051aed33 authored by Filip Roséen's avatar Filip Roséen Committed by Rémi Denis-Courmont

input: bookmarks: support fractional seconds

Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <remi@remlab.net>
parent 8b4015ff
......@@ -586,8 +586,8 @@ static void UpdateBookmarksOption( input_thread_t *p_input )
/* Append bookmark to option-buffer */
/* TODO: escape inappropriate values */
vlc_memstream_printf( &vstr, "%s{name=%s,time=%" PRId64 "}",
i > 0 ? "," : "", sp->psz_name, sp->i_time_offset / CLOCK_FREQ );
vlc_memstream_printf( &vstr, "%s{name=%s,time=%.3f}",
i > 0 ? "," : "", sp->psz_name, ( 1. * sp->i_time_offset ) / CLOCK_FREQ );
}
vlc_mutex_unlock( &priv->p_item->lock );
......
......@@ -437,7 +437,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
}
else if( !strncmp( psz_start, "time=", 5 ) )
{
p_seekpoint->i_time_offset = atoll(psz_start + 5) *
p_seekpoint->i_time_offset = atof(psz_start + 5) *
CLOCK_FREQ;
}
psz_start = psz_end + 1;
......
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