File: 0058-demux-mkv-write-the-actual-extra-data-size-in-the-AL.patch

package info (click to toggle)
vlc 3.0.21-10
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 212,728 kB
  • sloc: ansic: 441,379; cpp: 110,628; objc: 36,394; sh: 6,947; makefile: 6,592; javascript: 4,902; xml: 1,611; asm: 1,355; yacc: 640; python: 555; lex: 88; perl: 77; sed: 16
file content (26 lines) | stat: -rw-r--r-- 1,060 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Mon, 5 Aug 2024 11:04:09 +0200
Subject: demux: mkv: write the actual extra data size in the ALAC extradata

This is what avcodec/audio expects when detecting the extradata.

See InitDecoderConfig()

(cherry picked from commit d2265e981fa19a9f5f1299e968348ed3ca98ee60)
---
 modules/demux/mkv/matroska_segment_parse.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index 2b93674..706733e 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -60,7 +60,7 @@ static inline void fill_extra_data_alac( mkv_track_t *p_tk )
        https://github.com/macosforge/alac/blob/master/ALACMagicCookieDescription.txt */
     SetDWBE( p_extra, p_tk->fmt.i_extra );
     memcpy( p_extra + 4, "alac", 4 );
-    SetDWBE( p_extra + 8, 0 );
+    SetDWBE( p_extra + 8, p_tk->i_extra_data );
     memcpy( p_extra + 12, p_tk->p_extra_data, p_tk->i_extra_data );
 }