diff options
author | Rainer Hochecker <fernetmenta@online.de> | 2016-06-21 09:27:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-21 09:27:05 +0200 |
commit | 7b8e69124c4eb050bc62f020351623007b115140 (patch) | |
tree | 448302bec7a5ceea90ace712fe5af53cbda3ca32 | |
parent | e8e6c2a8e52632245dca2b9d0c765935c4feeeeb (diff) | |
parent | ce35ff93213876fdf52a97622dbaae8c0763d984 (diff) |
Merge pull request #10018 from mapfau/memleak
VIdeoPlayer: Fix double mem alloation if streamcodec hasn't changed
-rw-r--r-- | xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp index 851ddfae9d..ec96dafc07 100644 --- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp +++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp @@ -383,6 +383,7 @@ void CDVDDemuxClient::RequestStreams() streamAudio->iBitsPerSample = source->iBitsPerSample; if (source->ExtraSize > 0 && source->ExtraData) { + delete[] streamAudio->ExtraData; streamAudio->ExtraData = new uint8_t[source->ExtraSize]; streamAudio->ExtraSize = source->ExtraSize; for (unsigned int j=0; j<source->ExtraSize; j++) @@ -424,6 +425,7 @@ void CDVDDemuxClient::RequestStreams() streamVideo->stereo_mode = "mono"; if (source->ExtraSize > 0 && source->ExtraData) { + delete[] streamVideo->ExtraData; streamVideo->ExtraData = new uint8_t[source->ExtraSize]; streamVideo->ExtraSize = source->ExtraSize; for (unsigned int j=0; j<source->ExtraSize; j++) @@ -458,6 +460,7 @@ void CDVDDemuxClient::RequestStreams() if (source->ExtraSize == 4) { + delete[] streamSubtitle->ExtraData; streamSubtitle->ExtraData = new uint8_t[4]; streamSubtitle->ExtraSize = 4; for (int j=0; j<4; j++) |