зеркало из https://github.com/mozilla/gecko-dev.git
Bug 941298 - Fix errors in content/media/fmp4 on Linux with clang and --enable-warnings-as-errors r=cpearce
This commit is contained in:
Родитель
679eaab499
Коммит
85cdddfa3e
|
@ -45,8 +45,8 @@ public:
|
|||
MediaDataDecoderCallback* aCallback,
|
||||
BlankMediaDataCreator* aCreator)
|
||||
: mSample(aSample)
|
||||
, mCallback(aCallback)
|
||||
, mCreator(aCreator)
|
||||
, mCallback(aCallback)
|
||||
{
|
||||
}
|
||||
NS_IMETHOD Run() MOZ_OVERRIDE
|
||||
|
@ -161,10 +161,9 @@ public:
|
|||
BlankAudioDataCreator(uint32_t aChannelCount,
|
||||
uint32_t aSampleRate,
|
||||
uint16_t aBitsPerSample)
|
||||
: mFrameSum(0),
|
||||
mChannelCount(aChannelCount),
|
||||
mSampleRate(aSampleRate),
|
||||
mBitsPerSample(aBitsPerSample)
|
||||
: mFrameSum(0)
|
||||
, mChannelCount(aChannelCount)
|
||||
, mSampleRate(aSampleRate)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -204,7 +203,6 @@ private:
|
|||
int64_t mFrameSum;
|
||||
uint32_t mChannelCount;
|
||||
uint32_t mSampleRate;
|
||||
uint16_t mBitsPerSample;
|
||||
};
|
||||
|
||||
class BlankDecoderModule : public PlatformDecoderModule {
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
MOZ_COUNT_CTOR(MP4Stream);
|
||||
MOZ_ASSERT(aResource);
|
||||
}
|
||||
~MP4Stream() {
|
||||
virtual ~MP4Stream() {
|
||||
MOZ_COUNT_DTOR(MP4Stream);
|
||||
}
|
||||
|
||||
|
@ -83,10 +83,10 @@ private:
|
|||
|
||||
MP4Reader::MP4Reader(AbstractMediaDecoder* aDecoder)
|
||||
: MediaDecoderReader(aDecoder)
|
||||
, mLayersBackendType(layers::LayersBackend::LAYERS_NONE)
|
||||
, mAudio("MP4 audio decoder data", Preferences::GetUint("media.mp4-audio-decode-ahead", 2))
|
||||
, mVideo("MP4 video decoder data", Preferences::GetUint("media.mp4-video-decode-ahead", 2))
|
||||
, mLastReportedNumDecodedFrames(0)
|
||||
, mLayersBackendType(layers::LayersBackend::LAYERS_NONE)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread(), "Must be on main thread.");
|
||||
MOZ_COUNT_CTOR(MP4Reader);
|
||||
|
@ -371,6 +371,7 @@ MP4Reader::Decode(TrackType aTrack)
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifdef LOG_SAMPLE_DECODE
|
||||
static const char*
|
||||
TrackTypeToStr(TrackType aTrack)
|
||||
{
|
||||
|
@ -381,6 +382,7 @@ TrackTypeToStr(TrackType aTrack)
|
|||
default: return "Unknown";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
MP4Reader::Output(mp4_demuxer::TrackType aTrack, MediaData* aSample)
|
||||
|
|
|
@ -61,12 +61,12 @@ namespace mp4_demuxer {
|
|||
#ifdef PR_LOGGING
|
||||
#define DMX_LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define DMX_LOG(...) 0
|
||||
#define DMX_LOG(...) (void)0
|
||||
#endif
|
||||
#else
|
||||
// define DMX_LOG as 0, so that if(condition){DMX_LOG(...)} branches don't elicit
|
||||
// a warning-as-error.
|
||||
#define DMX_LOG(...) 0
|
||||
#define DMX_LOG(...) (void)0
|
||||
#endif
|
||||
|
||||
// A macro to disallow the evil copy constructor and operator= functions
|
||||
|
|
|
@ -27,7 +27,7 @@ struct Box {
|
|||
class StreamReader {
|
||||
public:
|
||||
StreamReader(Stream* stream, int64_t offset, int64_t size)
|
||||
: stream_(stream), start_(offset), pos_(0), size_(size) {}
|
||||
: start_(offset), size_(size), pos_(0), stream_(stream) {}
|
||||
|
||||
bool HasBytes(int count) { return (pos() + count <= size()); }
|
||||
|
||||
|
|
|
@ -97,8 +97,6 @@ bool MP4Demuxer::Init()
|
|||
void MP4Demuxer::Reset() {
|
||||
moov_ = nullptr;
|
||||
runs_ = nullptr;
|
||||
stream_offset_; // TODO; Not sure if this needs to be reset?
|
||||
DMX_LOG("Warning: resetting stream_offset_\n");
|
||||
moof_head_ = 0;
|
||||
mdat_tail_ = 0;
|
||||
}
|
||||
|
@ -303,15 +301,7 @@ bool MP4Demuxer::ParseBox() {
|
|||
}
|
||||
|
||||
bool MP4Demuxer::EmitSample(nsAutoPtr<MP4Sample>* sample) {
|
||||
bool ok = true;
|
||||
if (!runs_->IsRunValid()) {
|
||||
|
||||
// Flush any buffers we've gotten in this chunk so that buffers don't
|
||||
// cross NewSegment() calls
|
||||
//ok = SendAndFlushSamples(/*audio_buffers, video_buffers*/);
|
||||
//if (!ok)
|
||||
// return false;
|
||||
|
||||
ChangeState(kParsingBoxes);
|
||||
//end_of_segment_cb_.Run();
|
||||
return true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче