[vlc-commits] demux: ts: use es_format_isSimilar
Francois Cartegnie
git at videolan.org
Thu Apr 9 16:37:29 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr 9 15:08:07 2015 +0200| [9956325272d710f8db30c553f92b686a4fb2bde5] | committer: Francois Cartegnie
demux: ts: use es_format_isSimilar
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9956325272d710f8db30c553f92b686a4fb2bde5
---
modules/demux/mpeg/ts.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index bfa1025..bb04634 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -5326,16 +5326,15 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_dvbpsipmt )
if( b_reusing_pid )
{
/* p_pes points to a tmp pes */
- if( pespid->u.p_pes->es.fmt.i_codec != p_pes->es.fmt.i_codec ||
+ if( !es_format_IsSimilar( &pespid->u.p_pes->es.fmt, &p_pes->es.fmt ) ||
pespid->u.p_pes->es.fmt.i_extra != p_pes->es.fmt.i_extra ||
- pespid->u.p_pes->es.fmt.i_extra != 0 ||
+ memcmp( pespid->u.p_pes->es.fmt.p_extra, p_pes->es.fmt.p_extra,
+ p_pes->es.fmt.i_extra ) ||
pespid->u.p_pes->extra_es.i_size != p_pes->extra_es.i_size ||
- !( ( !pespid->u.p_pes->es.fmt.psz_language &&
- !p_pes->es.fmt.psz_language ) ||
- ( pespid->u.p_pes->es.fmt.psz_language &&
- p_pes->es.fmt.psz_language &&
- !strcmp( pespid->u.p_pes->es.fmt.psz_language,
- p_pes->es.fmt.psz_language ) ) ) )
+ !!pespid->u.p_pes->es.fmt.psz_language != !!p_pes->es.fmt.psz_language ||
+ ( pespid->u.p_pes->es.fmt.psz_language && p_pes->es.fmt.psz_language &&
+ strcmp( pespid->u.p_pes->es.fmt.psz_language, p_pes->es.fmt.psz_language ) )
+ )
{
/* Differs, swap then */
ts_pes_t *old = pespid->u.p_pes;
More information about the vlc-commits
mailing list