Ticket #5513: libs_libmythtv_tv_play.cpp-check-pthread.patch

File libs_libmythtv_tv_play.cpp-check-pthread.patch, 768 bytes (added by Erik Hovland <erik@…>, 12 years ago)

checks pthread_create for failure

  • mythtv/libs/libmythtv/tv_play.cpp

    Make sure that pthread_create is checked.
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     mythtv/libs/libmythtv/tv_play.cpp |    3 ++-
     1 files changed, 2 insertions(+), 1 deletions(-)
    
    diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
    index a0b54d2..588002b 100644
    a b bool TV::StartRecorder(RemoteEncoder *rec, int maxWait) 
    17861786bool TV::StartPlayer(bool isWatchingRecording, int maxWait)
    17871787{
    17881788    SetupPlayer(isWatchingRecording);
    1789     pthread_create(&decode, NULL, SpawnDecode, nvp);
     1789    if (pthread_create(&decode, NULL, SpawnDecode, nvp))
     1790        return false;
    17901791
    17911792    maxWait = (maxWait <= 0) ? 20000 : maxWait;
    17921793#ifdef USING_VALGRIND