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

Thomas Guillem thomas at gllm.fr
Wed Apr 14 13:01:50 UTC 2021


From: Thomas Guillem <git at videolan.org>

vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Apr  1 17:00:45 2021 +0200| [269a9a78b08c61240f5a0aaaa106c2abb8a9064c] | committer: Thomas Guillem

cdda: fix reported ts not in sync after a seek

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=269a9a78b08c61240f5a0aaaa106c2abb8a9064c
---
 modules/access/cdda.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/access/cdda.c b/modules/access/cdda.c
index 53a85a6f1a5..d5e0822192a 100644
--- a/modules/access/cdda.c
+++ b/modules/access/cdda.c
@@ -208,6 +208,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, (INT64_C(40000) * sys->position) / 3);
             break;
 
         case DEMUX_GET_LENGTH:
@@ -218,6 +219,7 @@ static int DemuxControl(demux_t *demux, int query, va_list args)
             break;
         case DEMUX_SET_TIME:
             sys->position = (va_arg(args, vlc_tick_t) * 3) / INT64_C(40000);
+            date_Set(&sys->pts, (INT64_C(40000) * sys->position) / 3);
             break;
 
         default:
-- 
2.30.0



More information about the vlc-devel mailing list