Skip to content

Commit 163c9eb

Browse files
nihil-admirarigithub-actions[bot]
authored andcommitted
Fix chapter embedding (#48)
1 parent e3be344 commit 163c9eb

4 files changed

+107
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ These patches have been applied to the builds:
3939
by [@tpikonen](https://github.com/tpikonen).
4040
Fixes [yt-dlp#4127](https://github.com/yt-dlp/yt-dlp/issues/4127), [FFmpeg#8684](https://trac.ffmpeg.org/ticket/8684)
4141

42+
### 2. Chapter embedding regression
43+
44+
by [@bashonly](https://github.com/bashonly).
45+
Fixes [FFmpeg#10482](https://trac.ffmpeg.org/ticket/10482)
4246

4347

4448
## Release-only patches
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
From 4629460590960d09ad5ac06c9bd34b45836b290b Mon Sep 17 00:00:00 2001
2+
From: bashonly <[email protected]>
3+
Date: Sat, 21 Oct 2023 23:51:48 +0300
4+
Subject: [PATCH 1/2] Revert "fftools/ffmpeg_mux_init: Use all metadata
5+
selectors if none is specified."
6+
7+
This reverts commit 653ee3f159411a1b97c19b96393a39f29569ed99.
8+
---
9+
fftools/ffmpeg_mux_init.c | 6 +++---
10+
1 file changed, 3 insertions(+), 3 deletions(-)
11+
12+
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
13+
index ab2d1d89e4..4cf18b4f02 100644
14+
--- a/fftools/ffmpeg_mux_init.c
15+
+++ b/fftools/ffmpeg_mux_init.c
16+
@@ -2182,11 +2182,11 @@ static int copy_metadata(Muxer *mux, AVFormatContext *ic,
17+
if (ret < 0)
18+
return ret;
19+
20+
- if (type_in == 'g' || type_out == 'g' || !*outspec)
21+
+ if (type_in == 'g' || type_out == 'g')
22+
*metadata_global_manual = 1;
23+
- if (type_in == 's' || type_out == 's' || !*outspec)
24+
+ if (type_in == 's' || type_out == 's')
25+
*metadata_streams_manual = 1;
26+
- if (type_in == 'c' || type_out == 'c' || !*outspec)
27+
+ if (type_in == 'c' || type_out == 'c')
28+
*metadata_chapters_manual = 1;
29+
30+
/* ic is NULL when just disabling automatic mappings */
31+
--
32+
2.39.2
33+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From 76899a7a6dbdee5b85a2cc17942e9fef9abdf73e Mon Sep 17 00:00:00 2001
2+
From: bashonly <[email protected]>
3+
Date: Sat, 21 Oct 2023 23:51:55 +0300
4+
Subject: [PATCH 2/2] Revert "fftools/ffmpeg_mux_init: drop a duplicated block
5+
in copy_metadata()"
6+
7+
This reverts commit 3c7dd5ed37da6d2de06c4850de5a319ca9cdd47f.
8+
---
9+
fftools/ffmpeg_mux_init.c | 10 ++++++++++
10+
1 file changed, 10 insertions(+)
11+
12+
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
13+
index 4cf18b4f02..4664ad9baa 100644
14+
--- a/fftools/ffmpeg_mux_init.c
15+
+++ b/fftools/ffmpeg_mux_init.c
16+
@@ -2182,6 +2182,16 @@ static int copy_metadata(Muxer *mux, AVFormatContext *ic,
17+
if (ret < 0)
18+
return ret;
19+
20+
+ if (!ic) {
21+
+ if (type_out == 'g' || !*outspec)
22+
+ *metadata_global_manual = 1;
23+
+ if (type_out == 's' || !*outspec)
24+
+ *metadata_streams_manual = 1;
25+
+ if (type_out == 'c' || !*outspec)
26+
+ *metadata_chapters_manual = 1;
27+
+ return 0;
28+
+ }
29+
+
30+
if (type_in == 'g' || type_out == 'g')
31+
*metadata_global_manual = 1;
32+
if (type_in == 's' || type_out == 's')
33+
--
34+
2.39.2
35+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From 71b32fb6b36188c699b169af49a3ddb2f71bddf3 Mon Sep 17 00:00:00 2001
2+
From: bashonly <[email protected]>
3+
Date: Sun, 22 Oct 2023 12:58:53 +0300
4+
Subject: [PATCH] Revert "fftools/ffmpeg_mux_init: drop a duplicated block in
5+
copy_metadata()"
6+
7+
This reverts commit 3c7dd5ed37da6d2de06c4850de5a319ca9cdd47f.
8+
---
9+
fftools/ffmpeg_mux_init.c | 10 ++++++++++
10+
1 file changed, 10 insertions(+)
11+
12+
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
13+
index e42d5ff26a..1a9611d19d 100644
14+
--- a/fftools/ffmpeg_mux_init.c
15+
+++ b/fftools/ffmpeg_mux_init.c
16+
@@ -1822,6 +1822,16 @@ static int copy_metadata(Muxer *mux, AVFormatContext *ic,
17+
parse_meta_type(mux, inspec, &type_in, &idx_in, &istream_spec);
18+
parse_meta_type(mux, outspec, &type_out, &idx_out, &ostream_spec);
19+
20+
+ if (!ic) {
21+
+ if (type_out == 'g' || !*outspec)
22+
+ *metadata_global_manual = 1;
23+
+ if (type_out == 's' || !*outspec)
24+
+ *metadata_streams_manual = 1;
25+
+ if (type_out == 'c' || !*outspec)
26+
+ *metadata_chapters_manual = 1;
27+
+ return 0;
28+
+ }
29+
+
30+
if (type_in == 'g' || type_out == 'g')
31+
*metadata_global_manual = 1;
32+
if (type_in == 's' || type_out == 's')
33+
--
34+
2.39.2
35+

0 commit comments

Comments
 (0)