Changeset 505 for pjproject/trunk


Ignore:
Timestamp:
Jun 14, 2006 8:02:05 PM (18 years ago)
Author:
bennylp
Message:

Fixed couple of bugs in stream: (1) race condition when transport callback is called when stream is not fully initialized, and (2) timestamp is not incremented when NULL frame is fed in put_frame()

File:
1 edited

Legend:

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

    r457 r505  
    454454 
    455455    /* Number of samples in the frame */ 
    456     ts_len = frame->size / 2; 
     456    //ts_len = frame->size / 2; 
     457    ts_len = port->info.samples_per_frame; 
    457458 
    458459    /* Init frame_out buffer. */ 
     
    940941    stream->last_dtmf = -1; 
    941942 
    942     /* Attach transport */ 
    943     status = (*tp->op->attach)(tp, stream, &info->rem_addr,  
    944                                sizeof(info->rem_addr), &on_rx_rtp, 
    945                                &on_rx_rtcp); 
    946     if (status != PJ_SUCCESS) 
    947         goto err_cleanup; 
    948  
    949     stream->transport = tp; 
    950  
    951943 
    952944    /* Create mutex to protect jitter buffer: */ 
     
    10611053        goto err_cleanup; 
    10621054 
     1055 
     1056    /* Only attach transport when stream is ready. */ 
     1057    status = (*tp->op->attach)(tp, stream, &info->rem_addr,  
     1058                               sizeof(info->rem_addr), &on_rx_rtp, 
     1059                               &on_rx_rtcp); 
     1060    if (status != PJ_SUCCESS) 
     1061        goto err_cleanup; 
     1062 
     1063    stream->transport = tp; 
    10631064 
    10641065 
Note: See TracChangeset for help on using the changeset viewer.