Github messages for voidlinux
 help / color / mirror / Atom feed
From: Hoshpak <Hoshpak@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] ffmpeg: apply workaround for mesa vaapi bug
Date: Sun, 31 May 2020 09:07:17 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-22461@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 597 bytes --]

There is a new pull request by Hoshpak against master on the void-packages repository

https://github.com/Hoshpak/void-packages ffmpeg-vaapi-workaround
https://github.com/void-linux/void-packages/pull/22461

ffmpeg: apply workaround for mesa vaapi bug
Works around https://bugs.freedesktop.org/show_bug.cgi?id=105368
which causes segfaults with vaapi with some radeon card.
The patch was written by the kodi developers and sent
upstream in http://ffmpeg.org/pipermail/ffmpeg-devel/2019-March/240862.html .

A patch file from https://github.com/void-linux/void-packages/pull/22461.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ffmpeg-vaapi-workaround-22461.patch --]
[-- Type: text/x-diff, Size: 2509 bytes --]

From f2cf0c38014262248f897ef0b8fcfef5fed5744f Mon Sep 17 00:00:00 2001
From: Helmut Pozimski <helmut@pozimski.eu>
Date: Sun, 31 May 2020 09:03:48 +0200
Subject: [PATCH] ffmpeg: apply workaround for mesa vaapi bug

Works around https://bugs.freedesktop.org/show_bug.cgi?id=105368
which causes segfaults with vaapi with some radeon card.
The patch was written by the kodi developers and sent
upstream in http://ffmpeg.org/pipermail/ffmpeg-devel/2019-March/240862.html .
---
 .../workaround-mesa-readeon-vaapi-bug.patch   | 28 +++++++++++++++++++
 srcpkgs/ffmpeg/template                       |  2 +-
 2 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/ffmpeg/patches/workaround-mesa-readeon-vaapi-bug.patch

diff --git a/srcpkgs/ffmpeg/patches/workaround-mesa-readeon-vaapi-bug.patch b/srcpkgs/ffmpeg/patches/workaround-mesa-readeon-vaapi-bug.patch
new file mode 100644
index 00000000000..4a6406c4317
--- /dev/null
+++ b/srcpkgs/ffmpeg/patches/workaround-mesa-readeon-vaapi-bug.patch
@@ -0,0 +1,28 @@
+From 811d290844206fc73dc39c3e5b67d5d895baedf8 Mon Sep 17 00:00:00 2001
+From: Rainer Hochecker <fernetmenta@online.de>
+Date: Sat, 26 Jan 2019 19:48:35 +0100
+Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices
+
+This fixes / workarounds https://bugs.freedesktop.org/show_bug.cgi?id=105368.
+It was hit frequently when watching h264 channels received via DVB-X.
+Corresponding kodi bug: https://github.com/xbmc/xbmc/issues/15704
+---
+ libavcodec/vaapi_h264.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c
+index 5854587a255..f12fdc457a4 100644
+--- libavcodec/vaapi_h264.c
++++ libavcodec/vaapi_h264.c
+@@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx)
+     H264SliceContext *sl = &h->slice_ctx[0];
+     int ret;
+ 
++    if (pic->nb_slices == 0) {
++        ret = AVERROR_INVALIDDATA;
++        goto finish;
++    }
++
+     ret = ff_vaapi_decode_issue(avctx, pic);
+     if (ret < 0)
+         goto finish;
diff --git a/srcpkgs/ffmpeg/template b/srcpkgs/ffmpeg/template
index bd27f41538a..7e9f398db22 100644
--- a/srcpkgs/ffmpeg/template
+++ b/srcpkgs/ffmpeg/template
@@ -2,7 +2,7 @@
 # audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname!
 pkgname=ffmpeg
 version=4.2.3
-revision=1
+revision=2
 short_desc="Decoding, encoding and streaming software"
 maintainer="Johannes <johannes.brechtmann@gmail.com>"
 license="GPL-3.0-or-later"

             reply	other threads:[~2020-05-31  7:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-31  7:07 Hoshpak [this message]
2020-05-31 10:31 ` [PR PATCH] [Merged]: " Hoshpak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-22461@inbox.vuxu.org \
    --to=hoshpak@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).