[vlc-devel] [PATCH] opus: avoid NULL pointer dereference
Tristan Matthews
le.businessman at gmail.com
Wed Dec 4 01:27:00 CET 2013
---
modules/codec/opus.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/codec/opus.c b/modules/codec/opus.c
index de6e3d0..b739fc5 100644
--- a/modules/codec/opus.c
+++ b/modules/codec/opus.c
@@ -360,6 +360,7 @@ static void *ProcessPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
*pp_block = NULL; /* To avoid being fed the same packet again */
+ if( p_block )
{
block_t *p_aout_buffer = DecodePacket( p_dec, p_oggpacket,
p_block->i_nb_samples,
@@ -368,6 +369,10 @@ static void *ProcessPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
block_Release( p_block );
return p_aout_buffer;
}
+ else
+ {
+ return NULL;
+ }
}
/*****************************************************************************
--
1.8.1.2
More information about the vlc-devel
mailing list