Bug 1320705: P2. Add mDiscardPadding information. r?kinetik draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 30 Nov 2016 17:24:45 +1100
changeset 447399 6ca28565d22c01bede8dbcc2b891ac2913580d28
parent 447398 90d44881a02cd089b6338fa2324b676830dfec1e
child 447400 07a0906b973d9bd03104beb7ecfcb1f159e69553
push id38050
push userbmo:jyavenard@mozilla.com
push dateSun, 04 Dec 2016 20:45:36 +0000
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
--- 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;