Ticket #11452: 0174-Player-Delete-decoder-after-decoder-thread-stopped.patch

File 0174-Player-Delete-decoder-after-decoder-thread-stopped.patch, 1.1 KB (added by stuartm, 7 years ago)

Possible fix

  • mythtv/libs/libmythtv/mythplayer.cpp

    From f4f76bc9d69bf7d1a8e2c276822c02ff3f6802ee Mon Sep 17 00:00:00 2001
    From: Lawrence Rust <lvr@softsystem.co.uk>
    Date: Fri, 9 Aug 2013 13:53:29 +0100
    Subject: [PATCH 174/193] Player: Delete decoder after decoder thread stopped
    
    It is important to delete the decoder in DecoderEnd to ensure that any
    threads allocated by the Ffmpeg decoder are stopped before the video
    buffers are deallocated.  If not then random crashes can be observed
    when exiting playback of H264 encoded material if CPUs are > 1.
    
    Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
    ---
     mythtv/libs/libmythtv/mythplayer.cpp |    1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp
    index b5f9e6e..87955d3 100644
    a b void MythPlayer::DecoderEnd(void) 
    31663166        LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to stop decoder loop.");
    31673167    else
    31683168        LOG(VB_PLAYBACK, LOG_INFO, LOC + "Exited decoder loop.");
     3169    SetDecoder(NULL);
    31693170}
    31703171
    31713172void MythPlayer::DecoderPauseCheck(void)