[vlc-commits] demux: ps: clear warning
Francois Cartegnie
git at videolan.org
Mon Aug 19 20:49:35 CEST 2019
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Aug 19 19:21:12 2019 +0200| [fe63655328414e014e8a027ce2af907455abd263] | committer: Francois Cartegnie
demux: ps: clear warning
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fe63655328414e014e8a027ce2af907455abd263
---
modules/demux/mpeg/ps.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mpeg/ps.h b/modules/demux/mpeg/ps.h
index 16db3fddb2..1ce0bb4185 100644
--- a/modules/demux/mpeg/ps.h
+++ b/modules/demux/mpeg/ps.h
@@ -37,7 +37,10 @@
#define PS_TK_COUNT (256+256+256+8 - 0xc0)
static inline int ps_id_to_tk( unsigned i_id )
{
- if( i_id <= 0xff )
+ assert(i_id >= 0xc0);
+ if(unlikely(i_id < 0xc0))
+ return 0;
+ else if( i_id <= 0xff )
return i_id - 0xc0;
else if( (i_id & 0xff00) == 0xbd00 )
return 256-0xC0 + (i_id & 0xff);
More information about the vlc-commits
mailing list