[mythtv-commits] Ticket #3046: Bogus position map causes fast forward locks in frontend after [12645]

MythTV mythtv at cvs.mythtv.org
Wed Feb 21 18:28:40 UTC 2007


#3046: Bogus position map causes fast forward locks in frontend after [12645]
-----------------------+----------------------------------------------------
 Reporter:  anonymous  |        Owner:  janne   
     Type:  defect     |       Status:  reopened
 Priority:  minor      |    Milestone:  0.21    
Component:  mythtv     |      Version:  head    
 Severity:  medium     |   Resolution:          
-----------------------+----------------------------------------------------
Comment (by dm at prolingua.co.uk):

 I've found the cause of the infinite loop.  The explanation takes longer
 than the fix.

 When ffmpeg detects the error it returns -1 and AvFormatDecoder::GetFrame
 stores this in the "ret" variable.  It then tests "ret" and sets
 "have_err" to true but leaves "ret" as -1.  The loop clears "have_err" but
 again leaves "ret" unchanged.  If the next packet is a subtitle packet
 which doesn't alter "ret" but sets "len" to zero intending this to skip
 the packet there is a problem at the end when it subtracts ret from len.
 Since ret is negative this sets len to 1.  The loop tests for len being
 greater than zero and so doesn't exit leading to an infinite loop.

 The fix is simply to set ret to zero after setting have_err.

 David.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/3046#comment:10>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list