File: 0010-ip-ffmpeg-reset-swr_frame_start-when-seeking.patch

package info (click to toggle)
cmus 2.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,404 kB
  • sloc: ansic: 40,498; sh: 1,642; makefile: 255; python: 157
file content (20 lines) | stat: -rw-r--r-- 618 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
From: ihy123 <aladinandreyy@gmail.com>
Date: Sun, 17 Aug 2025 15:54:19 +0300
Subject: ip/ffmpeg: reset swr_frame_start when seeking

---
 ip/ffmpeg.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ip/ffmpeg.c b/ip/ffmpeg.c
index c659c13..71cc511 100644
--- a/ip/ffmpeg.c
+++ b/ip/ffmpeg.c
@@ -444,6 +444,7 @@ static int ffmpeg_seek(struct input_plugin_data *ip_data, double offset)
 		return -IP_ERROR_FUNCTION_NOT_SUPPORTED;
 
 	priv->swr_frame->nb_samples = 0;
+	priv->swr_frame_start = 0;
 	avcodec_flush_buffers(priv->codec_ctx);
 	swr_convert(priv->swr, NULL, 0, NULL, 0); /* flush swr buffer */
 	return 0;