Added fix for mozbz#1632456

This commit is contained in:
Martin Stransky 2020-05-25 22:40:31 +02:00
parent fac8607f93
commit 41962ee4b4
2 changed files with 58 additions and 1 deletions

View File

@ -118,7 +118,7 @@ ExcludeArch: s390x
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 76.0.1
Release: 6%{?nss_tag}%{?dist}
Release: 7%{?nss_tag}%{?dist}
URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz
@ -200,6 +200,7 @@ Patch586: mozilla-1619882-1.patch
Patch587: mozilla-1619882-2.patch
Patch588: mozilla-1619882-3.patch
Patch589: mozilla-1634213.patch
Patch590: mozilla-1632456.patch
# PGO/LTO patches
Patch600: pgo.patch
@ -417,6 +418,7 @@ This package contains results of tests executed during build.
%patch587 -p1 -b .mozilla-1619882-2
%patch588 -p1 -b .mozilla-1619882-3
%patch589 -p1 -b .mozilla-1634213
%patch590 -p1 -b .mozilla-1632456
# PGO patches
%patch600 -p1 -b .pgo
@ -991,6 +993,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
* Mon May 25 2020 Martin Stransky <stransky@redhat.com> - 76.0.1-7
- Added fix for mozbz#1632456
* Mon May 25 2020 Martin Stransky <stransky@redhat.com> - 76.0.1-6
- Added fix for mozbz#1634213

52
mozilla-1632456.patch Normal file
View File

@ -0,0 +1,52 @@
changeset: 531979:da64e8ddf04b
tag: tip
parent: 531977:9a0589e208e8
user: Martin Stransky <stransky@redhat.com>
date: Mon May 25 22:29:45 2020 +0200
files: dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
description:
Bug 1632456 [Wayland] Release mVAAPIDeviceContext when FFmpegVideoDecoder::CreateVAAPIDeviceContext() fails, r?jya
Differential Revision: https://phabricator.services.mozilla.com/D76745
diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
--- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
@@ -187,32 +187,35 @@ bool FFmpegVideoDecoder<LIBAV_VER>::Crea
return false;
}
AVHWDeviceContext* hwctx = (AVHWDeviceContext*)mVAAPIDeviceContext->data;
AVVAAPIDeviceContext* vactx = (AVVAAPIDeviceContext*)hwctx->hwctx;
wl_display* display = widget::WaylandDisplayGetWLDisplay();
if (!display) {
FFMPEG_LOG("Can't get default wayland display.");
+ mLib->av_buffer_unref(&mVAAPIDeviceContext);
return false;
}
mDisplay = mLib->vaGetDisplayWl(display);
hwctx->user_opaque = new VAAPIDisplayHolder(mLib, mDisplay);
hwctx->free = VAAPIDisplayReleaseCallback;
int major, minor;
int status = mLib->vaInitialize(mDisplay, &major, &minor);
if (status != VA_STATUS_SUCCESS) {
+ mLib->av_buffer_unref(&mVAAPIDeviceContext);
return false;
}
vactx->display = mDisplay;
if (mLib->av_hwdevice_ctx_init(mVAAPIDeviceContext) < 0) {
+ mLib->av_buffer_unref(&mVAAPIDeviceContext);
return false;
}
mCodecContext->hw_device_ctx = mLib->av_buffer_ref(mVAAPIDeviceContext);
return true;
}
MediaResult FFmpegVideoDecoder<LIBAV_VER>::InitVAAPIDecoder() {