[vlc-commits] [Git][videolan/vlc][master] mock: fix pts in SET_POSITION control

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Sat Jun 4 14:41:00 UTC 2022



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
7e3684a6 by Alexandre Janniaux at 2022-06-04T14:26:17+00:00
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 !

- - - - -


1 changed file:

- modules/demux/mock.c


Changes:

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



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7e3684a665de0cf5ab5b1c9721d8507deafccc15

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7e3684a665de0cf5ab5b1c9721d8507deafccc15
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list