From 72534932ba3089668299f995237ca313a6ac0af0 Mon Sep 17 00:00:00 2001 From: leigh123linux Date: Fri, 3 Mar 2017 11:54:29 +0000 Subject: [PATCH] Fix vo_png with recent ffmpeg (rfbz#4470) --- mplayer-fix-vo_png.patch | 24 ++++++++++++++++++++++++ mplayer.spec | 12 ++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 mplayer-fix-vo_png.patch diff --git a/mplayer-fix-vo_png.patch b/mplayer-fix-vo_png.patch new file mode 100644 index 0000000..62b100c --- /dev/null +++ b/mplayer-fix-vo_png.patch @@ -0,0 +1,24 @@ +From 3e7a0f39e5acf4e9da96cb075050e51e24e81403 Mon Sep 17 00:00:00 2001 +From: rtogni +Date: Sun, 7 Aug 2016 20:44:47 +0000 +Subject: [PATCH] Fix vo_png with recent ffmpeg + +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. +--- + libvo/vo_png.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libvo/vo_png.c b/libvo/vo_png.c +index 38a4097..5696a1f 100644 +--- a/libvo/vo_png.c ++++ b/libvo/vo_png.c +@@ -136,6 +136,8 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin + avctx->pix_fmt = imgfmt2pixfmt(format); + avctx->width = width; + avctx->height = height; ++ avctx->time_base.num = 1; ++ avctx->time_base.den = 1; + if (avcodec_open2(avctx, avcodec_find_encoder(AV_CODEC_ID_PNG), NULL) < 0) { + uninit(); + return -1; diff --git a/mplayer.spec b/mplayer.spec index 2d15014..12cf51d 100644 --- a/mplayer.spec +++ b/mplayer.spec @@ -7,9 +7,9 @@ Name: mplayer Version: 1.3.0 %if 0%{?svn} -Release: 37.%{?pre}%{?dist} +Release: 38.%{?pre}%{?dist} %else -Release: 6%{?dist} +Release: 7%{?dist} %endif Summary: Movie player playing most video formats and DVDs @@ -37,6 +37,10 @@ Patch3: %{name}-ffmpeg.patch # https://bugzilla.rpmfusion.org/show_bug.cgi?id=4391 # Patch is from an upstream svn commit Patch4: %{name}-fix-screenshot-crash.patch +# Fix vo_png with recent ffmpeg +# https://bugzilla.rpmfusion.org/show_bug.cgi?id=4470 +# Patch is from an upstream svn commit +Patch5: %{name}-fix-vo_png.patch BuildRequires: SDL-devel BuildRequires: a52dec-devel @@ -231,6 +235,7 @@ rm -rf ffmpeg %patch1 -p1 -b .manlinks %patch3 -p1 -b .ffmpeg %patch4 -p1 -b .screenshot +%patch5 -p1 -b .vo_png mkdir GUI cp -a `ls -1|grep -v GUI` GUI/ @@ -386,6 +391,9 @@ update-desktop-database &>/dev/null || : %{_datadir}/mplayer/*.fp %changelog +* Fri Mar 03 2017 Leigh Scott - 1.3.0-7 +- Fix vo_png with recent ffmpeg (rfbz#4470) + * Mon Feb 06 2017 Leigh Scott - 1.3.0-6 - Fix screenshot crash (rfbz#4391)