зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1168674: [ogg] P8. Fix metadata retrieval. r=brion+1012
MozReview-Commit-ID: BMUNy4zyWMz --HG-- extra : rebase_source : 6bd1242b5195d1d2093df670797fcabbb6f8cc98
This commit is contained in:
Родитель
b0edcccd34
Коммит
2de6846418
|
@ -519,6 +519,7 @@ OggDemuxer::SetupMediaTracksInfo(const nsTArray<uint32_t>& aSerials)
|
|||
|
||||
mInfo.mAudio.mRate = vorbisState->mInfo.rate;
|
||||
mInfo.mAudio.mChannels = vorbisState->mInfo.channels;
|
||||
FillTags(&mInfo.mAudio, vorbisState->GetTags());
|
||||
} else if (codecState->GetType() == OggCodecState::TYPE_OPUS) {
|
||||
OpusState* opusState = static_cast<OpusState*>(codecState);
|
||||
if (!(mOpusState && mOpusState->mSerial == opusState->mSerial)) {
|
||||
|
@ -533,10 +534,23 @@ OggDemuxer::SetupMediaTracksInfo(const nsTArray<uint32_t>& aSerials)
|
|||
|
||||
mInfo.mAudio.mRate = opusState->mRate;
|
||||
mInfo.mAudio.mChannels = opusState->mChannels;
|
||||
FillTags(&mInfo.mAudio, opusState->GetTags());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
OggDemuxer::FillTags(TrackInfo* aInfo, MetadataTags* aTags)
|
||||
{
|
||||
if (!aTags) {
|
||||
return;
|
||||
}
|
||||
nsAutoPtr<MetadataTags> tags(aTags);
|
||||
for (auto iter = aTags->Iter(); !iter.Done(); iter.Next()) {
|
||||
aInfo->mTags.AppendElement(MetadataTag(iter.Key(), iter.Data()));
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
OggDemuxer::ReadMetadata()
|
||||
{
|
||||
|
|
|
@ -213,6 +213,7 @@ private:
|
|||
void SetupTargetOpus(OpusState* aOpusState, OggHeaders& aHeaders);
|
||||
void SetupTargetSkeleton();
|
||||
void SetupMediaTracksInfo(const nsTArray<uint32_t>& aSerials);
|
||||
void FillTags(TrackInfo* aInfo, MetadataTags* aTags);
|
||||
|
||||
// Compute an ogg page's checksum
|
||||
ogg_uint32_t GetPageChecksum(ogg_page* aPage);
|
||||
|
|
Загрузка…
Ссылка в новой задаче