- Timestamp:
- Oct 30, 2019 5:20:06 AM (5 years ago)
- Location:
- pjproject/trunk/pjmedia/src/pjmedia
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/stream.c
r6043 r6098 2850 2850 2851 2851 /* Send RTCP BYE (also SDES & XR) */ 2852 if ( !stream->rtcp_sdes_bye_disabled) {2852 if (stream->transport && !stream->rtcp_sdes_bye_disabled) { 2853 2853 send_rtcp(stream, PJ_TRUE, PJ_TRUE, PJ_TRUE, PJ_FALSE); 2854 2854 } -
pjproject/trunk/pjmedia/src/pjmedia/vid_stream.c
r6093 r6098 1604 1604 &stream->codec); 1605 1605 if (status != PJ_SUCCESS) 1606 return status;1606 goto err_cleanup; 1607 1607 1608 1608 /* Get codec param: */ … … 1614 1614 &def_param); 1615 1615 if (status != PJ_SUCCESS) 1616 return status;1616 goto err_cleanup; 1617 1617 1618 1618 info->codec_param = pjmedia_vid_codec_param_clone(pool, &def_param); … … 1665 1665 status = pj_mutex_create_simple(pool, NULL, &stream->jb_mutex); 1666 1666 if (status != PJ_SUCCESS) 1667 return status;1667 goto err_cleanup; 1668 1668 1669 1669 /* Init and open the codec. */ 1670 1670 status = pjmedia_vid_codec_init(stream->codec, pool); 1671 1671 if (status != PJ_SUCCESS) 1672 return status;1672 goto err_cleanup; 1673 1673 status = pjmedia_vid_codec_open(stream->codec, info->codec_param); 1674 1674 if (status != PJ_SUCCESS) 1675 return status;1675 goto err_cleanup; 1676 1676 1677 1677 /* Subscribe to codec events */ … … 1732 1732 info->rx_pt, info, &stream->dec); 1733 1733 if (status != PJ_SUCCESS) 1734 return status;1734 goto err_cleanup; 1735 1735 1736 1736 /* Create encoder channel */ … … 1738 1738 info->tx_pt, info, &stream->enc); 1739 1739 if (status != PJ_SUCCESS) 1740 return status;1740 goto err_cleanup; 1741 1741 1742 1742 /* Create temporary buffer for immediate decoding */ … … 1797 1797 jb_max, &stream->jb); 1798 1798 if (status != PJ_SUCCESS) 1799 return status;1799 goto err_cleanup; 1800 1800 1801 1801 … … 1847 1847 status = pjmedia_transport_attach2(tp, &att_param); 1848 1848 if (status != PJ_SUCCESS) 1849 return status;1849 goto err_cleanup; 1850 1850 1851 1851 stream->transport = tp; … … 1904 1904 1905 1905 return PJ_SUCCESS; 1906 1907 err_cleanup: 1908 pjmedia_vid_stream_destroy(stream); 1909 return status; 1906 1910 } 1907 1911 … … 1928 1932 1929 1933 /* Send RTCP BYE (also SDES) */ 1930 if ( !stream->rtcp_sdes_bye_disabled) {1934 if (stream->transport && !stream->rtcp_sdes_bye_disabled) { 1931 1935 send_rtcp(stream, PJ_TRUE, PJ_TRUE); 1932 1936 }
Note: See TracChangeset
for help on using the changeset viewer.