fix only first movie working
This commit is contained in:
@@ -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 )
|
||||||
|
|||||||
Reference in New Issue
Block a user