mkvmuxer: Fix memory leak when Colour is set multiple times.

Change-Id: I5650ca1116a5ae678b11ac5f6a8abf1590bc9e3f
This commit is contained in:
Tom Finegan 2016-08-26 19:15:26 -07:00
parent fa182de6e4
commit 725f36207e

View File

@ -1379,6 +1379,7 @@ bool VideoTrack::SetColour(const Colour& colour) {
colour_ptr->primaries = colour.primaries;
colour_ptr->max_cll = colour.max_cll;
colour_ptr->max_fall = colour.max_fall;
delete colour_;
colour_ = colour_ptr.release();
return true;
}