Changeset 5898


Ignore:
Timestamp:
Oct 17, 2018 12:52:26 AM (6 years ago)
Author:
ming
Message:

Re #2157: Minor change: prioritize rtp_cb2() and add more robustness

File:
1 edited

Legend:

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

    r5897 r5898  
    211211    pj_assert(adapter->stream_user_data == NULL); 
    212212    adapter->stream_user_data = att_param->user_data; 
    213     if (att_param->rtp_cb) { 
     213    if (att_param->rtp_cb2) { 
     214        adapter->stream_rtp_cb2 = att_param->rtp_cb2; 
     215    } else { 
    214216        adapter->stream_rtp_cb = att_param->rtp_cb; 
    215     } else { 
    216         adapter->stream_rtp_cb2 = att_param->rtp_cb2; 
    217217    } 
    218218    adapter->stream_rtcp_cb = att_param->rtcp_cb; 
     
    220220 
    221221    att_param->rtp_cb2 = &transport_rtp_cb2; 
     222    att_param->rtp_cb = NULL;     
    222223    att_param->rtcp_cb = &transport_rtcp_cb; 
    223224    att_param->user_data = adapter; 
Note: See TracChangeset for help on using the changeset viewer.