fix only first movie working

This commit is contained in:
Glenn Maynard
2003-12-06 01:33:10 +00:00
parent 7355fe9661
commit b4569b3b18
@@ -491,20 +491,20 @@ static avcodec::URLProtocol RageProtocol =
NULL NULL
}; };
static void InitProtocol() static void RegisterProtocols()
{ {
static bool Done = false; static bool Done = false;
if( Done ) if( Done )
return; return;
Done = true; Done = true;
avcodec::av_register_all();
avcodec::register_protocol( &RageProtocol ); avcodec::register_protocol( &RageProtocol );
} }
void MovieTexture_FFMpeg::CreateDecoder() void MovieTexture_FFMpeg::CreateDecoder()
{ {
avcodec::av_register_all(); RegisterProtocols();
InitProtocol();
int ret = avcodec::av_open_input_file( &decoder->m_fctx, "rage://" + GetID().filename, NULL, 0, NULL ); int ret = avcodec::av_open_input_file( &decoder->m_fctx, "rage://" + GetID().filename, NULL, 0, NULL );
if( ret < 0 ) if( ret < 0 )