From bcd57adc6438381439c38c776e59804831d4fba4 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Thu, 22 Jun 2017 14:44:21 +0200 Subject: [PATCH] Bug 1374774: P3. Remove HasSPS method. r=gerald It was only used in one spot, and incorrectly at that. MozReview-Commit-ID: EWkkrAlYT7W --HG-- extra : rebase_source : 9c719bbf668eafaac0415580ffdfa0cea0942673 --- dom/media/fmp4/MP4Demuxer.cpp | 2 +- media/libstagefright/binding/H264.cpp | 6 ------ media/libstagefright/binding/include/mp4_demuxer/H264.h | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/dom/media/fmp4/MP4Demuxer.cpp b/dom/media/fmp4/MP4Demuxer.cpp index ec4fff67dc82..df8dd7b9294c 100644 --- a/dom/media/fmp4/MP4Demuxer.cpp +++ b/dom/media/fmp4/MP4Demuxer.cpp @@ -520,7 +520,7 @@ MP4TrackDemuxer::GetSamples(int32_t aNumSamples) } for (const auto& sample : samples->mSamples) { // Collect telemetry from h264 Annex B SPS. - if (mNeedSPSForTelemetry && mp4_demuxer::H264::HasSPS(sample)) { + if (mNeedSPSForTelemetry && mp4_demuxer::H264::HasSPS(sample->mExtraData)) { RefPtr extradata = mp4_demuxer::H264::ExtractExtraData(sample); mNeedSPSForTelemetry = AccumulateSPSTelemetry(extradata); diff --git a/media/libstagefright/binding/H264.cpp b/media/libstagefright/binding/H264.cpp index 043503d452b7..515a8ee1baee 100644 --- a/media/libstagefright/binding/H264.cpp +++ b/media/libstagefright/binding/H264.cpp @@ -783,12 +783,6 @@ H264::ExtractExtraData(const mozilla::MediaRawData* aSample) return extradata.forget(); } -/* static */ bool -H264::HasSPS(const mozilla::MediaRawData* aSample) -{ - return HasSPS(aSample->mExtraData); -} - /* static */ bool H264::HasSPS(const mozilla::MediaByteBuffer* aExtraData) { diff --git a/media/libstagefright/binding/include/mp4_demuxer/H264.h b/media/libstagefright/binding/include/mp4_demuxer/H264.h index a9c32faf7f69..45eeb724bc5b 100644 --- a/media/libstagefright/binding/include/mp4_demuxer/H264.h +++ b/media/libstagefright/binding/include/mp4_demuxer/H264.h @@ -414,7 +414,6 @@ public: const mozilla::MediaByteBuffer* aNAL); /* Check if out of band extradata contains a SPS NAL */ - static bool HasSPS(const mozilla::MediaRawData* aSample); static bool HasSPS(const mozilla::MediaByteBuffer* aExtraData); // Extract SPS and PPS NALs from aSample by looking into each NALs. // aSample must be in AVCC format.