mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 10:38:53 +00:00
Linux case sensitivity hack for opening RoQ files with ffmpeg
This commit is contained in:
parent
27c1fe476a
commit
c4bc217d26
1 changed files with 14 additions and 2 deletions
|
@ -655,8 +655,20 @@ bool idCinematicLocal::InitFromFFMPEGFile( const char* qpath, bool amilooping )
|
|||
|
||||
if( ( ret = avformat_open_input( &fmt_ctx, fullpath, NULL, NULL ) ) < 0 )
|
||||
{
|
||||
common->Warning( "idCinematic: Cannot open FFMPEG video file: '%s', %d\n", qpath, looping );
|
||||
return false;
|
||||
// SRS - another case sensitivity hack for Linux, this time for ffmpeg and RoQ files
|
||||
idStr ext;
|
||||
fullpath.ExtractFileExtension( ext );
|
||||
if( idStr::Cmp( ext.c_str(), "roq" ) == 0 )
|
||||
{
|
||||
// SRS - If ffmpeg can't open .roq file, then try again with .RoQ extension instead
|
||||
fullpath.Replace( ".roq", ".RoQ" );
|
||||
ret = avformat_open_input( &fmt_ctx, fullpath, NULL, NULL );
|
||||
}
|
||||
if( ret < 0 )
|
||||
{
|
||||
common->Warning( "idCinematic: Cannot open FFMPEG video file: '%s', %d\n", qpath, looping );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if( ( ret = avformat_find_stream_info( fmt_ctx, NULL ) ) < 0 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue