PR #25729 opened by DeVshaurya01
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25729
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25729.patch

tmv packets get their timestamps from cur_dts, which is reset before read_seek. 
Without updating it, timestamps restart at 0 after a seek and ffmpeg -ss 1 -i 
pop-partial.tmv outputs no frames.

Signed-off-by: Shaurya Atram <[email protected]>

# Summary of changes

Briefly describe what this PR does and why.

<!--
If this PR requires new FATE test samples, attach them to the PR and
list their target paths below (relative to the fate-suite root).

Attached filenames must match the sample's filename:

```fate-samples
# e.g. vorbis/new-sample.ogg
```
-->



>From c455ffdbfd41433a2d0c9528ae2024eacb9adcc0 Mon Sep 17 00:00:00 2001
From: Shaurya Atram <[email protected]>
Date: Tue, 3 Nov 2026 15:17:44 +0000
Subject: [PATCH] avformat/tmv: update cur_dts after seeking

tmv packets get their timestamps from cur_dts, which is reset before read_seek. 
Without updating it, timestamps restart at 0 after a seek and ffmpeg -ss 1 -i 
pop-partial.tmv outputs no frames.

Signed-off-by: Shaurya Atram <[email protected]>
---
 libavformat/tmv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/tmv.c b/libavformat/tmv.c
index ae4973f0f37..d3bd88961ef 100644
--- a/libavformat/tmv.c
+++ b/libavformat/tmv.c
@@ -183,6 +183,7 @@ static int tmv_read_seek(AVFormatContext *s, int 
stream_index,
     if (avio_seek(s->pb, pos + TMV_HEADER_SIZE, SEEK_SET) < 0)
         return -1;
     tmv->stream_index = 0;
+    avpriv_update_cur_dts(s, s->streams[0], timestamp);
     return 0;
 }
 
-- 
2.54.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to