From 82fabe3151052abf704c12dcf5a8fd1a29e1223c Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Sat, 21 Jul 2012 09:32:36 +0000 Subject: [PATCH] Fix libv4l --- ffmpeg-0.10.4-backport-libv4l2.patch | 33 ++++++++++++++++++++++++++++ ffmpeg.spec | 7 +++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 ffmpeg-0.10.4-backport-libv4l2.patch diff --git a/ffmpeg-0.10.4-backport-libv4l2.patch b/ffmpeg-0.10.4-backport-libv4l2.patch new file mode 100644 index 0000000..1007da9 --- /dev/null +++ b/ffmpeg-0.10.4-backport-libv4l2.patch @@ -0,0 +1,33 @@ +X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=blobdiff_plain;f=libavdevice%2Fv4l2.c;h=2808e13ac3fa143a41f8a56877aaffc82344a0b5;hp=4829b1b694902235b4c06308a4e0dda7aa0dc52c;hb=fd58678b86023ea98665f06756bf03f91e56be54;hpb=b040ffc84c5e35436590e0bcea6608a2ad31cf84 + +diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c +index 4829b1b..2808e13 100644 +--- a/libavdevice/v4l2.c ++++ b/libavdevice/v4l2.c +@@ -156,9 +156,6 @@ static int device_open(AVFormatContext *ctx) + { + struct v4l2_capability cap; + int fd; +-#if CONFIG_LIBV4L2 +- int fd_libv4l; +-#endif + int res, err; + int flags = O_RDWR; + +@@ -175,16 +172,6 @@ static int device_open(AVFormatContext *ctx) + + return AVERROR(err); + } +-#if CONFIG_LIBV4L2 +- fd_libv4l = v4l2_fd_open(fd, 0); +- if (fd < 0) { +- err = AVERROR(errno); +- av_log(ctx, AV_LOG_ERROR, "Cannot open video device with libv4l neither %s : %s\n", +- ctx->filename, strerror(errno)); +- return err; +- } +- fd = fd_libv4l; +-#endif + + res = v4l2_ioctl(fd, VIDIOC_QUERYCAP, &cap); + if (res < 0) { diff --git a/ffmpeg.spec b/ffmpeg.spec index 5a371cd..f22bb4e 100644 --- a/ffmpeg.spec +++ b/ffmpeg.spec @@ -12,7 +12,7 @@ Summary: Digital VCR and streaming server Name: ffmpeg Version: 0.11.1 -Release: 1%{?date}%{?date:git}%{?rel}%{?dist} +Release: 2%{?date}%{?date:git}%{?rel}%{?dist} %if 0%{?_with_amr:1} License: GPLv3+ %else @@ -26,6 +26,7 @@ Source0: ffmpeg-%{?branch}%{date}.tar.bz2 Source0: http://ffmpeg.org/releases/ffmpeg-%{version}.tar.bz2 %endif Source1: ffmpeg-snapshot-oldabi.sh +Patch0: ffmpeg-0.10.4-backport-libv4l2.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: %{name}-libs = %{version}-%{release} BuildRequires: bzip2-devel @@ -157,6 +158,7 @@ echo "git-snapshot-%{?branch}%{date}-RPMFusion" > VERSION %else %setup -q -n ffmpeg-%{version} %endif +%patch0 -p1 %build mkdir generic @@ -278,6 +280,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jul 21 2012 Nicolas Chauvet - 0.11.1-2 +- Backport fix rfbz#2423 + * Thu Jun 14 2012 Julian Sikorski - 0.11.1-1 - Updated to 0.11.1