Ignore:
Timestamp:
May 28, 2015 7:07:17 AM (9 years ago)
Author:
nanang
Message:

Misc (re #1843): Updated error message in pjmedia stream & video stream upon RTP receiving failure, also avoid printing the same message repeatedly of same subsequent failures.

File:
1 edited

Legend:

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

    r4816 r5101  
    172172    pj_uint32_t              last_dec_ts;   /**< Last decoded timestamp.    */ 
    173173    int                      last_dec_seq;  /**< Last decoded sequence.     */ 
    174  
     174    pj_status_t              rtp_rx_last_err; /**< Last RTP recv() error.   */ 
    175175 
    176176    pj_timestamp             ts_freq;       /**< Timestamp frequency.       */ 
     
    607607    /* Check for errors */ 
    608608    if (bytes_read < 0) { 
    609         LOGERR_((channel->port.info.name.ptr, "RTP recv() error",  
    610                 (pj_status_t)-bytes_read)); 
     609        status = (pj_status_t)-bytes_read; 
     610        if (stream->rtp_rx_last_err != status) { 
     611            char errmsg[PJ_ERR_MSG_SIZE]; 
     612            pj_strerror(status, errmsg, sizeof(errmsg)); 
     613            PJ_LOG(4,(channel->port.info.name.ptr, 
     614                      "Unable to receive RTP packet, recv() returned %d: %s", 
     615                      status, errmsg)); 
     616            stream->rtp_rx_last_err = status; 
     617        } 
    611618        return; 
     619    } else { 
     620        stream->rtp_rx_last_err = PJ_SUCCESS; 
    612621    } 
    613622 
Note: See TracChangeset for help on using the changeset viewer.