mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1035059 - Fix releasing of libav frames; r=edwin
This commit is contained in:
parent
4ee73488db
commit
8c31b563c1
@ -85,7 +85,7 @@ FFmpegDataDecoder<LIBAV_VER>::Init()
|
|||||||
mCodecContext.get_format = ChoosePixelFormat;
|
mCodecContext.get_format = ChoosePixelFormat;
|
||||||
|
|
||||||
mCodecContext.thread_count = PR_GetNumberOfProcessors();
|
mCodecContext.thread_count = PR_GetNumberOfProcessors();
|
||||||
mCodecContext.thread_type = FF_THREAD_FRAME;
|
mCodecContext.thread_type = FF_THREAD_SLICE | FF_THREAD_FRAME;
|
||||||
mCodecContext.thread_safe_callbacks = false;
|
mCodecContext.thread_safe_callbacks = false;
|
||||||
|
|
||||||
mCodecContext.extradata = mExtraData.begin();
|
mCodecContext.extradata = mExtraData.begin();
|
||||||
|
@ -137,7 +137,11 @@ FFmpegH264Decoder<LIBAV_VER>::AllocateBufferCb(AVCodecContext* aCodecContext,
|
|||||||
FFmpegH264Decoder<LIBAV_VER>::ReleaseBufferCb(AVCodecContext* aCodecContext,
|
FFmpegH264Decoder<LIBAV_VER>::ReleaseBufferCb(AVCodecContext* aCodecContext,
|
||||||
AVFrame* aFrame)
|
AVFrame* aFrame)
|
||||||
{
|
{
|
||||||
reinterpret_cast<Image*>(aFrame->opaque)->Release();
|
Image* image = reinterpret_cast<Image*>(aFrame->opaque);
|
||||||
|
avcodec_default_release_buffer(aCodecContext, aFrame);
|
||||||
|
if (image) {
|
||||||
|
image->Release();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user