mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 1237809: [h264] P1. Ensure correct video dimensions are passed to the decoder. r=cpearce
Dimensions are extracted from the SPS found in metadata if present.
This commit is contained in:
parent
23b425f2f7
commit
c51d397d8c
@ -139,6 +139,11 @@ H264Converter::CreateDecoder()
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
}
|
||||
UpdateConfigFromExtraData(mCurrentConfig.mExtraData);
|
||||
if (!mNeedAVCC) {
|
||||
// When using a decoder handling AnnexB, we get here only once from the
|
||||
// constructor. We do want to get the dimensions extracted from the SPS.
|
||||
mOriginalConfig = mCurrentConfig;
|
||||
}
|
||||
|
||||
mDecoder = mPDM->CreateVideoDecoder(mNeedAVCC ? mCurrentConfig : mOriginalConfig,
|
||||
mLayersBackend,
|
||||
|
@ -53,7 +53,7 @@ private:
|
||||
void OnDecoderInitFailed(MediaDataDecoder::DecoderFailureReason aReason);
|
||||
|
||||
RefPtr<PlatformDecoderModule> mPDM;
|
||||
const VideoInfo& mOriginalConfig;
|
||||
VideoInfo mOriginalConfig;
|
||||
VideoInfo mCurrentConfig;
|
||||
layers::LayersBackend mLayersBackend;
|
||||
RefPtr<layers::ImageContainer> mImageContainer;
|
||||
|
Loading…
Reference in New Issue
Block a user