Skip to content

Commit

Permalink
Merge #1119, fix memory leak. 2.0.249
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Jul 21, 2018
1 parent 5952671 commit 6d7c741
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ Remark:

## History

* v2.0, 2018-07-21, Merge [#1119][bug #1119], fix memory leak. 2.0.249
* <strong>v2.0, 2018-07-18, [2.0 release3(2.0.248)][r2.0r3] released. 86775 lines.</strong>
* v2.0, 2018-07-17, Merge [#1176][bug #1176], fix scaned issues. 2.0.248
* v2.0, 2018-02-28, Merge [#1077][bug #1077], fix crash for edge HLS. 2.0.247
Expand Down Expand Up @@ -1311,6 +1312,7 @@ Winlin
[bug #1059]: https://github.com/ossrs/srs/issues/1059
[bug #1077]: https://github.com/ossrs/srs/issues/1077
[bug #1176]: https://github.com/ossrs/srs/issues/1176
[bug #1119]: https://github.com/ossrs/srs/issues/1119
[bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx

[exo #828]: https://github.com/google/ExoPlayer/pull/828
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 3 additions & 0 deletions trunk/src/kernel/srs_kernel_ts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
5 changes: 4 additions & 1 deletion trunk/src/main/srs_main_ingest_hls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 6d7c741

Please sign in to comment.