[vlc-commits] tivo: remove redundant extension checks

Rémi Denis-Courmont git at videolan.org
Fri Sep 25 18:05:58 CEST 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Sep 25 17:16:03 2020 +0300| [9916f9e4f08445f2e8cac84402ad6b77609d7246] | committer: Rémi Denis-Courmont

tivo: remove redundant extension checks

With the extension registered, the force flag is implied if the file
name matches one of the extension.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9916f9e4f08445f2e8cac84402ad6b77609d7246
---

 modules/demux/ty.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/modules/demux/ty.c b/modules/demux/ty.c
index ad783a6a96..7ea97f6eb2 100644
--- a/modules/demux/ty.c
+++ b/modules/demux/ty.c
@@ -311,9 +311,7 @@ static int Open(vlc_object_t *p_this)
          U32_AT(&p_peek[4]) != 0x02 ||
          U32_AT(&p_peek[8]) != CHUNK_SIZE )
     {
-        if( !p_demux->obj.force &&
-            !demux_IsPathExtension( p_demux, ".ty" ) &&
-            !demux_IsPathExtension( p_demux, ".ty+" ) )
+        if( !p_demux->obj.force )
             return VLC_EGENERIC;
         msg_Warn( p_demux, "this does not look like a TY file, "
                            "continuing anyway..." );



More information about the vlc-commits mailing list