Browse Source

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 !
pull/136/head
Alexandre Janniaux 4 years ago
committed by Rémi Denis-Courmont
parent
commit
7e3684a665
  1. 3
      modules/demux/mock.c

3
modules/demux/mock.c

@ -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;

Loading…
Cancel
Save