Browse Source

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
pull/177/head
Steve Lhomme 2 years ago
parent
commit
b3ec88d531
  1. 2
      modules/demux/caf.c

2
modules/demux/caf.c

@ -716,7 +716,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 = i_size;
p_sys->fmt.p_extra = malloc( i_size );

Loading…
Cancel
Save