[vlc-commits] [Git][videolan/vlc][3.0.x] caf: don't keep extra data for an unknown codec

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Feb 17 12:04:49 UTC 2025



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
ac807d2c by Steve Lhomme at 2025-02-17T11:14:52+00:00
caf: don't keep extra data for an unknown codec

The codec ID is set in ReadDescChunk(). And according to the error before using it:

> The audio description chunk must be the first chunk

We should not be using codec data if we don't have the codec.
The file will eventually fail with this error, but we don't need to
copy bogus data before that.

Fixes #29012

(cherry picked from commit b3ec88d53167d4a3383db43328f10abcc454cebe)

- - - - -


1 changed file:

- modules/demux/caf.c


Changes:

=====================================
modules/demux/caf.c
=====================================
@@ -718,7 +718,7 @@ static int ReadKukiChunk( demux_t *p_demux, uint64_t i_size )
         int error = ProcessAACCookie( p_demux, p_peek, i_size );
         if( error ) return error;
     }
-    else
+    else if( p_sys->fmt.i_codec != 0 )
     {
         p_sys->fmt.i_extra = (int)i_size;
         p_sys->fmt.p_extra = malloc( i_size );



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ac807d2c8574c292a34c51e000c1554f372aa618

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ac807d2c8574c292a34c51e000c1554f372aa618
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