mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge #1119, fix memory leak. 2.0.249
This commit is contained in:
parent
5952671689
commit
6d7c7418a8
4 changed files with 10 additions and 2 deletions
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
// current release version
|
||||
#define VERSION_MAJOR 2
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 248
|
||||
#define VERSION_REVISION 249
|
||||
|
||||
// generated by configure, only macros.
|
||||
#include <srs_auto_headers.hpp>
|
||||
|
|
|
@ -184,8 +184,11 @@ SrsTsMessage* SrsTsMessage::detach()
|
|||
cp->sid = sid;
|
||||
cp->PES_packet_length = PES_packet_length;
|
||||
cp->continuity_counter = continuity_counter;
|
||||
|
||||
srs_freep(cp->payload);
|
||||
cp->payload = payload;
|
||||
payload = NULL;
|
||||
|
||||
return cp;
|
||||
}
|
||||
|
||||
|
|
|
@ -898,10 +898,12 @@ int SrsIngestSrsOutput::parse_message_queue()
|
|||
std::multimap<int64_t, SrsTsMessage*>::iterator it = queue.begin();
|
||||
|
||||
SrsTsMessage* msg = it->second;
|
||||
SrsAutoFree(SrsTsMessage, msg);
|
||||
queue.erase(it);
|
||||
|
||||
if (msg->channel->stream == SrsTsStreamVideoH264) {
|
||||
nb_videos--;
|
||||
}
|
||||
queue.erase(it);
|
||||
|
||||
// parse the stream.
|
||||
SrsStream avs;
|
||||
|
@ -935,6 +937,7 @@ int SrsIngestSrsOutput::flush_message_queue()
|
|||
std::multimap<int64_t, SrsTsMessage*>::iterator it = queue.begin();
|
||||
|
||||
SrsTsMessage* msg = it->second;
|
||||
SrsAutoFree(SrsTsMessage, msg);
|
||||
queue.erase(it);
|
||||
|
||||
// parse the stream.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue