File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,8 @@ int R_PrecacheCinematic( const char *cinname )
2626 if ( !cinname || !*cinname )
2727 return -1 ;
2828
29- // not AVI file
30- const char *ext = UTIL_FileExtension ( cinname );
31- if ( Q_stricmp ( ext, " avi" ) && Q_stricmp ( ext, " webm" )) // with ffmpeg we don't really have a limit here
32- return -1 ;
29+ if ( !UTIL_ValidMovieFileExtension ( cinname ))
30+ return -1 ; // skip unsupported video formats
3331
3432 int i;
3533 // first check for co-existing
@@ -83,7 +81,7 @@ void R_InitCinematics( void )
8381{
8482 // a1ba: this function is useless lmao
8583 // it's called before WORLD_HAS_MOVIES bit set
86- const char *name, *ext ;
84+ const char *name;
8785
8886 // make sure what we have texture to draw cinematics
8987 if ( !FBitSet ( world->features , WORLD_HAS_MOVIES ))
@@ -95,8 +93,7 @@ void R_InitCinematics( void )
9593
9694 if ( !name || !*name ) break ; // end of files array
9795
98- ext = UTIL_FileExtension ( name );
99- if ( Q_stricmp ( ext, " avi" )) continue ; // not AVI
96+ if ( !UTIL_ValidMovieFileExtension ( name )) continue ; // not supported video format
10097
10198 if ( R_PrecacheCinematic ( name ) == -1 )
10299 break ; // full
You can’t perform that action at this time.
0 commit comments