[vlc-commits] mpc: remove redundant extension checks

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


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

mpc: 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=4fddc116ff9cdd8ef5db5b45b803b1069f3acb30
---

 modules/demux/mpc.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/modules/demux/mpc.c b/modules/demux/mpc.c
index f08d6e1fa2..bd8891d2fc 100644
--- a/modules/demux/mpc.c
+++ b/modules/demux/mpc.c
@@ -110,13 +110,7 @@ static int Open( vlc_object_t * p_this )
             return VLC_EGENERIC;
 
         if( !p_demux->obj.force )
-        {
-            /* Check file name extension */
-            if( !demux_IsPathExtension( p_demux, ".mpc" ) &&
-                !demux_IsPathExtension( p_demux, ".mp+" ) &&
-                !demux_IsPathExtension( p_demux, ".mpp" ) )
-                return VLC_EGENERIC;
-        }
+            return VLC_EGENERIC;
     }
 
     /* */



More information about the vlc-commits mailing list