[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: packetizer: flac: fix leak on error
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Tue Jul 5 06:52:20 UTC 2022
Hugo Beauzée-Luyssen pushed to branch 3.0.x at VideoLAN / VLC
Commits:
719e63f6 by Francois Cartegnie at 2022-07-04T08:28:22+02:00
packetizer: flac: fix leak on error
(cherry picked from commit 5a3b687bf165656a6697b053d3499f7376d61ec8)
- - - - -
3a8e8002 by Francois Cartegnie at 2022-07-04T08:28:29+02:00
demux: flac: simplify condition
(cherry picked from commit 61a05c739b2b4ccc4a4515269ec65207ed03acbe)
- - - - -
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
=====================================
@@ -326,7 +326,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/47243c4a85d0cc0a8ff5a54f775e314c71fa7199...3a8e8002d371d31f694a79d616d25132ac614228
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/47243c4a85d0cc0a8ff5a54f775e314c71fa7199...3a8e8002d371d31f694a79d616d25132ac614228
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