Homesource Forums

Homeworld Source Editing Talk
It is currently Mon Apr 24, 2017 9:49 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu May 02, 2013 8:15 am 
Offline

Joined: Sat Jun 18, 2011 8:18 pm
Posts: 14
Hi,
I've been going through the movie playback code to crush the playback bug under 64-bit Linux. I haven't been able to locate the source of the bug but I believe it has to do with memory releasing/reuse in the movie player code. It looks like something isn't being freed correctly when a movie has played so the next time a movie launches it crashes the engine. This is reproducible behaviour. If you stub out one of the two intro movies it'll get into the game and crash on the first level loading. If you stub out the intro movies you can load the first mission fine but upon loading level 2 or quitting and reloading level 1 it'll crash on the video clip.


Top
 Profile  
 
PostPosted: Tue May 28, 2013 3:17 pm 
Offline
coder

Joined: Mon Jan 29, 2007 2:45 pm
Posts: 61
Looks like a bug in r909: it replaced the deprecated av_open_input_file with avformat_open_input but failed to replace av_close_input_file with avformat_close_input.


Top
 Profile  
 
PostPosted: Mon Mar 10, 2014 3:15 pm 
Offline

Joined: Thu Feb 27, 2014 4:21 pm
Posts: 5
I've made a patch, see: http://homesource.nekomimicon.net/sourceforum/viewtopic.php?f=8&t=347#p1853


Top
 Profile  
 
PostPosted: Sun Mar 16, 2014 11:32 am 
Offline
coder

Joined: Mon Jan 29, 2007 2:45 pm
Posts: 61
The correct fix is to replace the deprecated av_close_input_file(pFormatCtx) with avformat_close_input(&pFormatCtx) in aviFileExit. It zeroes the pointer. I don't see why zeroing the other pointers would be necessary.


Top
 Profile  
 
PostPosted: Tue Mar 18, 2014 2:58 pm 
Offline

Joined: Thu Feb 27, 2014 4:21 pm
Posts: 5
Hi shevek,

thanks for the information, i'll change the code with the next submit i'll make.
I just reset all pointers to be sure no stray memory references are left after cleanup, but i'll remove the corresponding lines, so just your suggestion remains. You're right, of course, i already tried your fix and it works as it should.


Cheers!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group