Skip to content
Snippets Groups Projects
Commit 7e3684a6 authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Rémi Denis-Courmont
Browse files

mock: fix pts in SET_POSITION control

The PTS is a fraction of the length but should always be re-normalized
by adding VLC_TICK_0 to be a valid timestamp.

    test_input_decoder_mock decoder: Wait for the picture to be flushed from the vout
    main input debug: control type=2
    main input debug: ES_OUT_RESET_PCR called
    main input error: Invalid PCR value in ES_OUT_SET_(GROUP_)PCR !
parent 0654e138
No related branches found
No related tags found
Loading
Pipeline #228113 passed with stages
in 25 minutes and 22 seconds
......@@ -364,7 +364,8 @@ Control(demux_t *demux, int query, va_list args)
case DEMUX_SET_POSITION:
if (!sys->can_seek)
return VLC_EGENERIC;
sys->pts = sys->video_pts = sys->audio_pts = va_arg(args, double) * sys->length;
sys->pts = sys->video_pts = sys->audio_pts =
VLC_TICK_0 + va_arg(args, double) * sys->length;
return VLC_SUCCESS;
case DEMUX_GET_LENGTH:
*va_arg(args, vlc_tick_t *) = sys->length;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment