Skip to content
Snippets Groups Projects
Commit 4dd514a9 authored by Jean-Yves Avenard's avatar Jean-Yves Avenard
Browse files

Bug 1206979: P2. Get around libav 0.8.5 bug. r=edwin

And probably others. When multhreading decoding is enabled ; the frames dimensions were incorrectly set.
parent 71d911ed
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,8 @@ FFmpegH264Decoder<LIBAV_VER>::FFmpegH264Decoder(
ImageContainer* aImageContainer)
: FFmpegDataDecoder(aTaskQueue, aCallback, GetCodecId(aConfig.mMimeType))
, mImageContainer(aImageContainer)
, mPictureWidth(aConfig.mImage.width)
, mPictureHeight(aConfig.mImage.height)
, mDisplayWidth(aConfig.mDisplay.width)
, mDisplayHeight(aConfig.mDisplay.height)
, mCodecParser(nullptr)
......@@ -49,6 +51,8 @@ FFmpegH264Decoder<LIBAV_VER>::Init()
mCodecContext->get_buffer = AllocateBufferCb;
mCodecContext->release_buffer = ReleaseBufferCb;
mCodecContext->width = mPictureWidth;
mCodecContext->height = mPictureHeight;
return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack, __func__);
}
......
......@@ -62,6 +62,8 @@ private:
int64_t GetPts(const AVPacket& packet);
nsRefPtr<ImageContainer> mImageContainer;
uint32_t mPictureWidth;
uint32_t mPictureHeight;
uint32_t mDisplayWidth;
uint32_t mDisplayHeight;
AVCodecParserContext* mCodecParser;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment