[FFmpeg-devel] [PATCH] avformat/libopenmpt: Update dts in read_seek function

Aida Jonikienė aidas957 at gmail.com
Wed Jan 8 17:19:12 EET 2025


This makes the song position correct after doing a seek operation
(previously there would be an EOF after seeking about more than half
into the song's actual duration).

Fixes ticket #7916.

Signed-off-by: Aida Jonikienė <aidas957 at gmail.com>
---
 libavformat/libopenmpt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c
index 736af7caf2..11b07db24d 100644
--- a/libavformat/libopenmpt.c
+++ b/libavformat/libopenmpt.c
@@ -213,6 +213,7 @@ static int read_seek_openmpt(AVFormatContext *s, int stream_idx, int64_t ts, int
 {
     OpenMPTContext *openmpt = s->priv_data;
     openmpt_module_set_position_seconds(openmpt->module, (double)ts/AV_TIME_BASE);
+    avpriv_update_cur_dts(s, s->streams[0], ts);
     return 0;
 }
 
-- 
2.47.1



More information about the ffmpeg-devel mailing list