Ignore:
Timestamp:
Feb 13, 2008 4:59:29 PM (13 years ago)
Author:
bennylp
Message:

Ticket #460: Concurrency problem when destroying stream (thanks Michael Broughton)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/stream.c

    r1780 r1790  
    14001400 
    14011401 
     1402    /* Detach from transport  
     1403     * MUST NOT hold stream mutex while detaching from transport, as 
     1404     * it may cause deadlock. See ticket #460 for the details. 
     1405     */ 
     1406    if (stream->transport) { 
     1407        pjmedia_transport_detach(stream->transport, stream); 
     1408        stream->transport = NULL; 
     1409    } 
     1410 
    14021411    /* This function may be called when stream is partly initialized. */ 
    14031412    if (stream->jb_mutex) 
    14041413        pj_mutex_lock(stream->jb_mutex); 
    14051414 
    1406  
    1407     /* Detach from transport */ 
    1408     if (stream->transport) { 
    1409         (*stream->transport->op->detach)(stream->transport, stream); 
    1410         stream->transport = NULL; 
    1411     } 
    14121415 
    14131416    /* Free codec. */ 
Note: See TracChangeset for help on using the changeset viewer.