Bug 1374774: P4. Correct H264 telemetry reporting. r=gerald

The code couldn't have worked, mNeedSPSForTelemetry can only be set if we didn't get an H264 extradata in the MP4 metadata.
So any calls to HasSPS(sample->mExtraData) would have always returned false.

MozReview-Commit-ID: 3PcRXJHBJyC

--HG--
extra : rebase_source : 4137b9c985ffe7ee3958fad509149bf911229eed
This commit is contained in:
Jean-Yves Avenard 2017-06-22 14:52:07 +02:00
Родитель bcd57adc64
Коммит bfeee68f7d
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -520,10 +520,14 @@ 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->mExtraData)) {
if (mNeedSPSForTelemetry) {
RefPtr<MediaByteBuffer> extradata =
mp4_demuxer::H264::ExtractExtraData(sample);
mNeedSPSForTelemetry = AccumulateSPSTelemetry(extradata);
if (mp4_demuxer::H264::HasSPS(extradata)) {
RefPtr<MediaByteBuffer> extradata =
mp4_demuxer::H264::ExtractExtraData(sample);
mNeedSPSForTelemetry = AccumulateSPSTelemetry(extradata);
}
}
}