[vlc-commits] [Git][videolan/vlc][master] 2 commits: packetizer: flac: fix leak on error
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Jul 2 09:11:30 UTC 2022
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
5a3b687b by Francois Cartegnie at 2022-07-02T08:59:32+00:00
packetizer: flac: fix leak on error
- - - - -
61a05c73 by Francois Cartegnie at 2022-07-02T08:59:32+00:00
demux: flac: simplify condition
- - - - -
2 changed files:
- modules/demux/flac.c
- modules/packetizer/flac.c
Changes:
=====================================
modules/demux/flac.c
=====================================
@@ -362,14 +362,12 @@ static int Demux( demux_t *p_demux )
demux_sys_t *p_sys = p_demux->p_sys;
block_t *p_block_out;
- bool b_eof = false;
if( p_sys->p_current_block == NULL )
- {
p_sys->p_current_block = vlc_stream_Block( p_demux->s, FLAC_PACKET_SIZE );
- b_eof = (p_sys->p_current_block == NULL);
- }
- if ( p_sys->p_current_block )
+ bool b_eof = (p_sys->p_current_block == NULL);
+
+ if ( !b_eof )
{
p_sys->p_current_block->i_flags = p_sys->i_next_block_flags;
p_sys->i_next_block_flags = 0;
=====================================
modules/packetizer/flac.c
=====================================
@@ -325,7 +325,10 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block)
if (!p_sys->b_stream_info)
ProcessHeader(p_dec);
- if (p_sys->stream_info.channels > 8) {
+ if (p_sys->stream_info.channels > 8)
+ {
+ if(in)
+ block_Release(in);
msg_Err(p_dec, "This stream uses too many audio channels (%d > 8)",
p_sys->stream_info.channels);
return NULL;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/42a58f2bec7e398f990a9285e01af0ee10dd2bdf...61a05c739b2b4ccc4a4515269ec65207ed03acbe
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/42a58f2bec7e398f990a9285e01af0ee10dd2bdf...61a05c739b2b4ccc4a4515269ec65207ed03acbe
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