[vlc-commits] [Git][videolan/vlc][master] 2 commits: demux: mkv: fix link to ALAC documentation

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Aug 8 11:01:20 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
d71ed1c6 by Steve Lhomme at 2024-08-08T10:26:20+00:00
demux: mkv: fix link to ALAC documentation

The 36 is the 12 bytes we write plus 24 bytes from ALACSpecificConfig.

Also avoid subtracting 12 from a variable were we added 12 (our header).

- - - - -
d2265e98 by Steve Lhomme at 2024-08-08T10:26:20+00:00
demux: mkv: write the actual extra data size in the ALAC extradata

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

See InitDecoderConfig()

- - - - -


1 changed file:

- modules/demux/mkv/matroska_segment_parse.cpp


Changes:

=====================================
modules/demux/mkv/matroska_segment_parse.cpp
=====================================
@@ -60,12 +60,12 @@ static inline void fill_extra_data_alac( mkv_track_t *p_tk )
     if( unlikely( !p_tk->fmt.p_extra ) ) return;
     p_tk->fmt.i_extra = p_tk->i_extra_data + 12;
     uint8_t *p_extra = static_cast<uint8_t*>( p_tk->fmt.p_extra );
-    /* See "ALAC Specific Info (36 bytes) (required)" from
-       alac.macosforge.org/trac/browser/trunk/ALACMagicCookieDescription.txt */
+    /* 12 bytes + "ALAC Specific Info (24 bytes) (required)" from
+       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 );
-    memcpy( p_extra + 12, p_tk->p_extra_data, p_tk->fmt.i_extra - 12 );
+    SetDWBE( p_extra + 8, p_tk->i_extra_data );
+    memcpy( p_extra + 12, p_tk->p_extra_data, p_tk->i_extra_data );
 }
 
 static inline void fill_extra_data( mkv_track_t *p_tk, unsigned int offset )



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2f4f0228d0e4025a9ef7958e71345085e8ef53e8...d2265e981fa19a9f5f1299e968348ed3ca98ee60

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2f4f0228d0e4025a9ef7958e71345085e8ef53e8...d2265e981fa19a9f5f1299e968348ed3ca98ee60
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list