[vlc-commits] demux: ts: fix invalid cast to decoded descriptor
Francois Cartegnie
git at videolan.org
Thu Feb 11 20:16:20 CET 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Feb 11 20:14:49 2016 +0100| [17d0021ceb7a64c3a9c451b63620cfc1f1f25f22] | committer: Francois Cartegnie
demux: ts: fix invalid cast to decoded descriptor
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=17d0021ceb7a64c3a9c451b63620cfc1f1f25f22
---
modules/demux/mpeg/ts_psip.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/modules/demux/mpeg/ts_psip.c b/modules/demux/mpeg/ts_psip.c
index 25539aa..d433899 100644
--- a/modules/demux/mpeg/ts_psip.c
+++ b/modules/demux/mpeg/ts_psip.c
@@ -311,20 +311,23 @@ static void ATSC_VCT_Callback( void *p_cb_basepid, dvbpsi_atsc_vct_t* p_vct )
{
char *psz_name = NULL;
- for( const dvbpsi_descriptor_t *p_dr = p_channel->p_first_descriptor;
+ for( dvbpsi_descriptor_t *p_dr = p_channel->p_first_descriptor;
p_dr; p_dr = p_dr->p_next )
{
switch( p_dr->i_tag )
{
case ATSC_DESCRIPTOR_EXTENDED_CHANNEL_NAME:
{
- const dvbpsi_extended_channel_name_dr_t *p_ecndr =
- (const dvbpsi_extended_channel_name_dr_t *)p_dr;
- if( unlikely(psz_name) )
- free( psz_name );
- psz_name = atsc_a65_Decode_multiple_string( p_ctx->p_a65,
- p_ecndr->i_long_channel_name,
- p_ecndr->i_long_channel_name_length );
+ dvbpsi_extended_channel_name_dr_t *p_ecndr =
+ dvbpsi_ExtendedChannelNameDr( p_dr );
+ if( p_ecndr )
+ {
+ if( unlikely(psz_name) )
+ free( psz_name );
+ psz_name = atsc_a65_Decode_multiple_string( p_ctx->p_a65,
+ p_ecndr->i_long_channel_name,
+ p_ecndr->i_long_channel_name_length );
+ }
} break;
More information about the vlc-commits
mailing list