mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1100913 - Fix incorrect playback of MSE with HE-AAC audio streams. r=cajbir
This commit is contained in:
parent
5d9ea3e8c0
commit
f76301c128
@ -642,6 +642,29 @@ MediaSourceReader::ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
MediaSourceReader::ReadUpdatedMetadata(MediaInfo* aInfo)
|
||||
{
|
||||
if (mAudioTrack) {
|
||||
MOZ_ASSERT(mAudioTrack->IsReady());
|
||||
mAudioReader = mAudioTrack->Decoders()[0]->GetReader();
|
||||
|
||||
const MediaInfo& info = mAudioReader->GetMediaInfo();
|
||||
MOZ_ASSERT(info.HasAudio());
|
||||
mInfo.mAudio = info.mAudio;
|
||||
}
|
||||
|
||||
if (mVideoTrack) {
|
||||
MOZ_ASSERT(mVideoTrack->IsReady());
|
||||
mVideoReader = mVideoTrack->Decoders()[0]->GetReader();
|
||||
|
||||
const MediaInfo& info = mVideoReader->GetMediaInfo();
|
||||
MOZ_ASSERT(info.HasVideo());
|
||||
mInfo.mVideo = info.mVideo;
|
||||
}
|
||||
*aInfo = mInfo;
|
||||
}
|
||||
|
||||
void
|
||||
MediaSourceReader::Ended()
|
||||
{
|
||||
|
@ -84,6 +84,7 @@ public:
|
||||
bool IsMediaSeekable() { return true; }
|
||||
|
||||
nsresult ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags) MOZ_OVERRIDE;
|
||||
void ReadUpdatedMetadata(MediaInfo* aInfo) MOZ_OVERRIDE;
|
||||
void Seek(int64_t aTime, int64_t aStartTime, int64_t aEndTime,
|
||||
int64_t aCurrentTime) MOZ_OVERRIDE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user