[mythtv-commits] Ticket #1543: avcodec race between live preview and playback causes mythfrontend hang

MythTV mythtv at cvs.mythtv.org
Sat Mar 18 14:15:17 UTC 2006


#1543: avcodec race between live preview and playback causes mythfrontend hang
----------------------------------+-----------------------------------------
 Reporter:  perveilerj at yahoo.com  |       Owner:  ijr
     Type:  patch                 |      Status:  new
 Priority:  minor                 |   Milestone:     
Component:  mythtv                |     Version:     
 Severity:  medium                |  
----------------------------------+-----------------------------------------
 There is a race between closing the live preview's codec and opening main
 playback's codec that can result in this error:[[BR]]
 "[mpeg2video @ 0xb741b840]insufficient thread locking around
 avcodec_open/close()",[[BR]]
 followed by a bunch of:[[BR]]
 "[mpeg2video @ 0xb741b840]get_buffer() failed (stride changed)
 2006-03-15 14:34:25.135 AFD Error: Unknown decoding error"[[BR]]
 and finally a black screen and unresponsive frontend.  It turns out that
 for certain streams av_find_stream_info() will eventually call
 avcodec_open() so it must be guarded by the avcodeclock.  These patches
 accomplish that and fix the problem.  I went hunting for other unsafe uses
 of avcodec_open/close (including indirect ones like av_find_stream_info())
 and I found a couple more in NuppleVideoRecorder.  The patches also fix
 those, but I have no way of testing them.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/1543>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list