gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash/server/asobj NetStream.cpp


From: Vitaly Alexeev
Subject: [Gnash-commit] gnash/server/asobj NetStream.cpp
Date: Wed, 08 Nov 2006 15:55:48 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Vitaly Alexeev <alexeev>        06/11/08 15:55:48

Modified files:
        server/asobj   : NetStream.cpp 

Log message:
                * backend\render_handler_ogl.cpp: hack for glRasterPos2f()
                * server\asobj\NetStream.cpp: pthread_join() should be caused
                  in only case when video streamer is started

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStream.cpp?cvsroot=gnash&r1=1.16&r2=1.17

Patches:
Index: NetStream.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStream.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- NetStream.cpp       7 Nov 2006 17:16:19 -0000       1.16
+++ NetStream.cpp       8 Nov 2006 15:55:48 -0000       1.17
@@ -18,7 +18,7 @@
 //
 //
 
-/* $Id: NetStream.cpp,v 1.16 2006/11/07 17:16:19 strk Exp $ */
+/* $Id: NetStream.cpp,v 1.17 2006/11/08 15:55:48 alexeev Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -62,7 +62,6 @@
        m_yuv(NULL),
        m_video_clock(0)
 {
-       //m_thread.p = NULL;
 }
 
 NetStream::~NetStream()
@@ -72,13 +71,14 @@
 
 void NetStream::close()
 {
+       if (m_go)
+       {
        // terminate thread
        m_go = false;
 
        // wait till thread is complete before main continues
        pthread_join(m_thread, NULL);
-       //if (m_thread.p) pthread_join(m_thread, NULL);
-       //m_thread.p = NULL;
+       }
 
        sound_handler* s = get_sound_handler();
        if (s)
@@ -212,6 +212,7 @@
        AVCodec* pCodec = avcodec_find_decoder(m_VCodecCtx->codec_id);
        if (pCodec == NULL)
        {
+               m_VCodecCtx = NULL;
                log_error("Decoder not found");
                return -1;
        }
@@ -256,7 +257,10 @@
 
 #endif
 
-       pthread_create(&m_thread, NULL, NetStream::av_streamer, this);
+       if (pthread_create(&m_thread, NULL, NetStream::av_streamer, this) != 0)
+       {
+               return -1;
+       };
 
        return 0;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]