Ticket #4660: release-lock-on-error-in-mythtranscode.patch

File release-lock-on-error-in-mythtranscode.patch, 823 bytes (added by Erik Hovland <erik@…>, 16 years ago)

adds a lock release to a failure path in mpeg2fix.cpp

  • programs/mythtranscode/mpeg2fix.cpp

    Mythtranscode holds a lock to manage reading and writing to its ring buffer.
    
    From: Erik Hovland <erik@hovland.org>
    
    There is an instance where it should give up the lock on error. But it
    doesn't. This one line patch addresses that instance.
    ---
    
     programs/mythtranscode/mpeg2fix.cpp |    1 +
     1 files changed, 1 insertions(+), 0 deletions(-)
    
    diff --git a/programs/mythtranscode/mpeg2fix.cpp b/programs/mythtranscode/mpeg2fix.cpp
    index 0f8d91a..44403d2 100644
    a b int MPEG2fixup::AddFrame(MPEG2frame *f) 
    679679        }
    680680        if (! ok)
    681681        {
     682            pthread_mutex_unlock( &rx.mutex );
    682683            //deadlock
    683684            VERBOSE(MPF_IMPORTANT,
    684685                    "Deadlock detected.  One buffer is full when\n"