Bug 1113403 - Make MP4Sample destructor virtual. r=kinetik, a=sledru
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 23 Dec 2014 14:40:29 +1100
changeset 242662 fe3f375b1d683fe4c838322a16ce4bd51e852fb1
parent 242661 6c63735d22444f0bf0d2081b12de1dad874163c6
child 242663 25674b68ea1c876285167f12a0e9c5e536dbd2a7
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik, sledru
bugs1113403
milestone36.0a2
Bug 1113403 - Make MP4Sample destructor virtual. r=kinetik, a=sledru
dom/media/webm/IntelWebMVideoDecoder.cpp
media/libstagefright/binding/include/mp4_demuxer/DecoderData.h
--- a/dom/media/webm/IntelWebMVideoDecoder.cpp
+++ b/dom/media/webm/IntelWebMVideoDecoder.cpp
@@ -52,17 +52,17 @@ public:
     byte_offset = aByteOffset;
     is_sync_point = aSyncPoint;
 
     data =  new uint8_t[aSize];
     size = aSize;
     memmove(data, aData, size);
   }
 
-  ~VP8Sample()
+  virtual ~VP8Sample()
   {
     delete data;
   }
 };
 
 IntelWebMVideoDecoder::IntelWebMVideoDecoder(WebMReader* aReader)
   : WebMVideoDecoder()
   , mReader(aReader)
--- a/media/libstagefright/binding/include/mp4_demuxer/DecoderData.h
+++ b/media/libstagefright/binding/include/mp4_demuxer/DecoderData.h
@@ -151,17 +151,17 @@ public:
 
 typedef int64_t Microseconds;
 
 class MP4Sample
 {
 public:
   MP4Sample();
   MP4Sample(const MP4Sample& copy);
-  ~MP4Sample();
+  virtual ~MP4Sample();
   void Update(int64_t& aMediaTime);
   void Pad(size_t aPaddingBytes);
 
   stagefright::MediaBuffer* mMediaBuffer;
 
   Microseconds decode_timestamp;
   Microseconds composition_timestamp;
   Microseconds duration;