[vlc-commits] packetizer: h264: fix leaks on Open failure
Francois Cartegnie
git at videolan.org
Fri Oct 7 16:33:30 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Oct 7 16:28:39 2016 +0200| [0f9bedaee8332da31e483fa73250676e7a9fc90e] | committer: Francois Cartegnie
packetizer: h264: fix leaks on Open failure
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0f9bedaee8332da31e483fa73250676e7a9fc90e
---
modules/packetizer/h264.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index 169888e..0eaa66b 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -264,12 +264,14 @@ static int Open( vlc_object_t *p_this )
if(!p_dec->fmt_out.p_extra)
{
msg_Err( p_dec, "Invalid AVC extradata");
+ Close( p_this );
return VLC_EGENERIC;
}
}
else
{
msg_Err( p_dec, "Invalid or missing AVC extradata");
+ Close( p_this );
return VLC_EGENERIC;
}
@@ -299,6 +301,7 @@ static int Open( vlc_object_t *p_this )
{
msg_Err( p_dec, "Invalid or missing SPS %d or PPS %d in AVC extradata",
p_sys->b_sps, p_sys->b_pps );
+ Close( p_this );
return VLC_EGENERIC;
}
More information about the vlc-commits
mailing list