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;