[dvblast-devel] Prevent crash when get_pmt is called but the PMT is not initialized.
Georgi Chorbadzhiyski
git at videolan.org
Wed Jan 23 12:25:59 CET 2013
dvblast | branch: master | Georgi Chorbadzhiyski <gf at unixsol.org> | Wed Jan 23 13:13:14 2013 +0200| [cb9d2aea5105eb9619290be5efe42b8c50a027c1] | committer: Georgi Chorbadzhiyski
Prevent crash when get_pmt is called but the PMT is not initialized.
> http://git.videolan.org/gitweb.cgi/dvblast.git/?a=commit;h=cb9d2aea5105eb9619290be5efe42b8c50a027c1
---
demux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/demux.c b/demux.c
index 667f9ea..765b911 100644
--- a/demux.c
+++ b/demux.c
@@ -2917,7 +2917,7 @@ uint8_t *demux_get_current_packed_SDT( unsigned int *pi_pack_size ) {
uint8_t *demux_get_packed_PMT( uint16_t i_sid, unsigned int *pi_pack_size ) {
sid_t *p_sid = FindSID( i_sid );
- if ( p_sid != NULL && pmt_validate( p_sid->p_current_pmt ) )
+ if ( p_sid != NULL && p_sid->p_current_pmt && pmt_validate( p_sid->p_current_pmt ) )
return psi_pack_section( p_sid->p_current_pmt, pi_pack_size );
return NULL;
}
More information about the dvblast-devel
mailing list