Bug 1320705: P2. Add mDiscardPadding information. r=kinetik
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 30 Nov 2016 17:24:45 +1100
changeset 325256 bea4ed2781a85d5c6b5128f3cf7b6c6400a69590
parent 325255 255480c6f63c3cc36b491f9abf1ff1bed456bd0f
child 325257 18b5d19d0abc3fc05d38e85c69b02fada82fae2b
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewerskinetik
bugs1320705
milestone53.0a1
Bug 1320705: P2. Add mDiscardPadding information. r=kinetik The WebMDemuxer added this information in the ExtraData field. However, this is incompatible with the MSE demuxer which will override the ExtraData field under some circumstances. It's cleaner to have a dedicated field anyway. MozReview-Commit-ID: GadD11zzZ8f
dom/media/MediaData.h
--- a/dom/media/MediaData.h
+++ b/dom/media/MediaData.h
@@ -637,16 +637,20 @@ public:
 
   const CryptoSample& mCrypto;
   RefPtr<MediaByteBuffer> mExtraData;
 
   // Used by the Vorbis decoder and Ogg demuxer.
   // Indicates that this is the last packet of the stream.
   bool mEOS = false;
 
+  // Indicate to the audio decoder that mDiscardPadding frames should be
+  // trimmed.
+  uint32_t mDiscardPadding = 0;
+
   RefPtr<SharedTrackInfo> mTrackInfo;
 
   // Return a deep copy or nullptr if out of memory.
   virtual already_AddRefed<MediaRawData> Clone() const;
   // Create a MediaRawDataWriter for this MediaRawData. The caller must
   // delete the writer once done. The writer is not thread-safe.
   virtual MediaRawDataWriter* CreateWriter();
   virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const;