[mythtv] [patch] Recording HDTV when no signal causes segfault
John Patrick Poet
john at BlueSkyTours.com
Tue May 25 00:03:51 EDT 2004
With HDTV, the signal strength is checked when tunning to a channel.
When recording, if the signal strength is too low, the encoder thread is
never created, but the pthread_join call was still being made. This
caused a segfault.
The attached patch prevents the pthread_join call from being made, if
the encoder thread was not created.
John
-------------- next part --------------
Index: libs/libmythtv/tv_rec.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/tv_rec.cpp,v
retrieving revision 1.148
diff -u -w -r1.148 tv_rec.cpp
--- libs/libmythtv/tv_rec.cpp 21 May 2004 03:39:58 -0000 1.148
+++ libs/libmythtv/tv_rec.cpp 25 May 2004 03:57:51 -0000
@@ -46,6 +46,7 @@
db_conn = NULL;
channel = NULL;
rbuffer = NULL;
+ encode = static_cast<pthread_t>(0);
nvr = NULL;
readthreadSock = NULL;
readthreadlive = false;
@@ -655,6 +656,7 @@
if (prevRecording && !killFile)
nvr->GetBlankFrameMap(blank_frame_map);
+ if(encode)
pthread_join(encode, NULL);
delete nvr;
}
More information about the mythtv-dev
mailing list