Restore extension detection (ty and ty+)
authorLaurent Aimar <fenrir@videolan.org>
Sat, 13 Oct 2007 20:30:22 +0000 (20:30 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 13 Oct 2007 20:30:22 +0000 (20:30 +0000)
modules/demux/ty.c

index 22f1d4f..deb6589 100644 (file)
@@ -218,7 +218,9 @@ static int Open(vlc_object_t *p_this)
          U32_AT(&p_peek[4]) != 0x02 ||
          U32_AT(&p_peek[8]) != CHUNK_SIZE )
     {
          U32_AT(&p_peek[4]) != 0x02 ||
          U32_AT(&p_peek[8]) != CHUNK_SIZE )
     {
-        if( !p_demux->b_force )
+        if( !p_demux->b_force &&
+            !demux2_IsPathExtension( p_demux, ".ty" ) &&
+            !demux2_IsPathExtension( p_demux, ".ty+" ) )
             return VLC_EGENERIC;
         msg_Warn( p_demux, "this does not look like a TY file, "
                            "continuing anyway..." );
             return VLC_EGENERIC;
         msg_Warn( p_demux, "this does not look like a TY file, "
                            "continuing anyway..." );