Fix screenshot crash (rfbz#4391)

el8
leigh123linux 8 years ago
parent 022f60b105
commit 40f04b0ce3

@ -0,0 +1,26 @@
From bbaf524d691d6bfecfd65175259fd61abc6e5f69 Mon Sep 17 00:00:00 2001
From: rtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Date: Sun, 3 Jul 2016 20:06:11 +0000
Subject: [PATCH] Fix crash with screenshot filter.
avcodec_open2() now requires timebase to be always set, even for png images.
The patch sets it to 1/1, since pictures do not have a framerate.
Patch by Thomas Kirsten (Tho_Ki gmx de)
---
libmpcodecs/vf_screenshot.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libmpcodecs/vf_screenshot.c b/libmpcodecs/vf_screenshot.c
index 4692d20..992ea6d 100644
--- a/libmpcodecs/vf_screenshot.c
+++ b/libmpcodecs/vf_screenshot.c
@@ -81,6 +81,8 @@ static int config(struct vf_instance *vf,
vf->priv->avctx->pix_fmt = AV_PIX_FMT_RGB24;
vf->priv->avctx->width = d_width;
vf->priv->avctx->height = d_height;
+ vf->priv->avctx->time_base.num = 1;
+ vf->priv->avctx->time_base.den = 1;
vf->priv->avctx->compression_level = 0;
if (avcodec_open2(vf->priv->avctx, avcodec_find_encoder(AV_CODEC_ID_PNG), NULL)) {
mp_msg(MSGT_VFILTER, MSGL_FATAL, "Could not open libavcodec PNG encoder\n");

@ -7,9 +7,9 @@
Name: mplayer
Version: 1.3.0
%if 0%{?svn}
Release: 36.%{?pre}%{?dist}
Release: 37.%{?pre}%{?dist}
%else
Release: 5%{?dist}
Release: 6%{?dist}
%endif
Summary: Movie player playing most video formats and DVDs
@ -32,7 +32,11 @@ Patch0: %{name}-config.patch
# use roff include statements instead of symlinks
Patch1: %{name}-manlinks.patch
# use system FFmpeg libraries
Patch3: %{name}-ffmpeg.patch
Patch3: %{name}-ffmpeg.patch
# Fix screenshot crash
# https://bugzilla.rpmfusion.org/show_bug.cgi?id=4391
# Patch is from an upstream svn commit
Patch4: %{name}-fix-screenshot-crash.patch
BuildRequires: SDL-devel
BuildRequires: a52dec-devel
@ -226,6 +230,7 @@ rm -rf ffmpeg
%patch0 -p1 -b .config
%patch1 -p1 -b .manlinks
%patch3 -p1 -b .ffmpeg
%patch4 -p1 -b .screenshot
mkdir GUI
cp -a `ls -1|grep -v GUI` GUI/
@ -381,6 +386,9 @@ update-desktop-database &>/dev/null || :
%{_datadir}/mplayer/*.fp
%changelog
* Mon Feb 06 2017 Leigh Scott <leigh123linux@googlemail.com> - 1.3.0-6
- Fix screenshot crash (rfbz#4391)
* Thu Nov 17 2016 Adrian Reber <adrian@lisas.de> - 1.3.0-5
- Rebuilt for libcdio-0.94

Loading…
Cancel
Save