[svn-commits] phsultan: branch phsultan/rtmp-support r295124 - /team/phsultan/rtmp-support/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Nov 16 08:27:22 CST 2010


Author: phsultan
Date: Tue Nov 16 08:27:18 2010
New Revision: 295124

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=295124
Log:
Don't cancel a thread that has not been initialized.

Modified:
    team/phsultan/rtmp-support/channels/chan_rtmp.c

Modified: team/phsultan/rtmp-support/channels/chan_rtmp.c
URL: http://svnview.digium.com/svn/asterisk/team/phsultan/rtmp-support/channels/chan_rtmp.c?view=diff&rev=295124&r1=295123&r2=295124
==============================================================================
--- team/phsultan/rtmp-support/channels/chan_rtmp.c (original)
+++ team/phsultan/rtmp-support/channels/chan_rtmp.c Tue Nov 16 08:27:18 2010
@@ -214,7 +214,9 @@
 	av_free(p->encoding_context);
 	av_free(p->decoding_context);
 
-	pthread_cancel(p->thread);
+	if (p->thread != AST_PTHREADT_NULL) {
+		pthread_cancel(p->thread);
+	}
 
 	RTMP_Close(p->rtmpin);
 	RTMP_Free(p->rtmpin);
@@ -280,6 +282,8 @@
 	p->rtmpout = RTMP_Alloc();
 	RTMP_Init(p->rtmpout);
 
+	p->thread = AST_PTHREADT_NULL;
+
 	return p;
 }
 




More information about the svn-commits mailing list