[vlc-devel] [PATCH 2/2] cdda: fix reported ts not in sync after a seek

Thomas Guillem thomas at gllm.fr
Thu Apr 1 15:01:51 UTC 2021


---
 modules/access/cdda.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/access/cdda.c b/modules/access/cdda.c
index 541e043a574..ec12fe7f4a2 100644
--- a/modules/access/cdda.c
+++ b/modules/access/cdda.c
@@ -218,6 +218,7 @@ static int DemuxControl(demux_t *demux, int query, va_list args)
 
         case DEMUX_SET_POSITION:
             sys->position = lround(va_arg(args, double) * sys->length);
+            date_Set(&sys->pts, PositionToTime(sys->position));
             break;
 
         case DEMUX_GET_LENGTH:
@@ -230,6 +231,7 @@ static int DemuxControl(demux_t *demux, int query, va_list args)
         {
             vlc_tick_t time = va_arg(args, vlc_tick_t);
             sys->position = TimeToPosition(time);
+            date_Set(&sys->pts, PositionToTime(sys->position));
             break;
         }
 
-- 
2.30.0



More information about the vlc-devel mailing list