Changeset 5581
- Timestamp:
- Apr 10, 2017 6:30:01 AM (8 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua2/media.hpp
r5273 r5581 109 109 110 110 /** Array of MediaFormat */ 111 typedef std::vector<MediaFormat *> MediaFormatVector;111 typedef std::vector<MediaFormat> MediaFormatVector; 112 112 113 113 /** -
pjproject/trunk/pjsip/src/pjsua2/media.cpp
r5273 r5581 599 599 600 600 for (unsigned i=0; i<dev_info.ext_fmt_cnt;++i) { 601 MediaFormatAudio *format = new MediaFormatAudio; 602 603 format->fromPj(dev_info.ext_fmt[i]); 604 if (format->type == PJMEDIA_TYPE_AUDIO) 601 MediaFormatAudio format; 602 format.fromPj(dev_info.ext_fmt[i]); 603 if (format.type == PJMEDIA_TYPE_AUDIO) 605 604 extFmt.push_back(format); 606 605 } … … 609 608 AudioDevInfo::~AudioDevInfo() 610 609 { 611 for(unsigned i=0;i<extFmt.size();++i) {612 delete extFmt[i];613 }614 extFmt.clear();615 610 } 616 611 … … 1265 1260 1266 1261 for (unsigned i = 0; i<dev_info.fmt_cnt;++i) { 1267 MediaFormatVideo *format = new MediaFormatVideo; 1268 1269 format->fromPj(dev_info.fmt[i]); 1270 if (format->type == PJMEDIA_TYPE_VIDEO) 1262 MediaFormatVideo format; 1263 format.fromPj(dev_info.fmt[i]); 1264 if (format.type == PJMEDIA_TYPE_VIDEO) 1271 1265 fmt.push_back(format); 1272 1266 } … … 1278 1272 VideoDevInfo::~VideoDevInfo() 1279 1273 { 1280 #if PJSUA_HAS_VIDEO1281 for (unsigned i = 0;i<fmt.size();++i) {1282 delete fmt[i];1283 }1284 fmt.clear();1285 #endif1286 1274 } 1287 1275
Note: See TracChangeset
for help on using the changeset viewer.