From b262f7bdb63da539ec3108c967be69f032a84f82 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 25 Mar 2013 09:56:41 +0000 Subject: [PATCH] * Mon Mar 25 2013 Hans de Goede - 1.0.6-1 - Rebase to 1.0.6 - Upgrade the buildin libav to 0.8.6 to get all the security fixes from upstream libav --- .gitignore | 4 +- gst-libav-configure-set-the-assembler.patch | 25 ++++++ gst-libav-fix-h264-decoding.patch | 84 ------------------- gstreamer1-libav.spec | 20 +++-- ...segfault-in-dsputil_init-with-gcc4.8.patch | 44 ---------- sources | 4 +- 6 files changed, 40 insertions(+), 141 deletions(-) create mode 100644 gst-libav-configure-set-the-assembler.patch delete mode 100644 gst-libav-fix-h264-decoding.patch delete mode 100644 libav-dsputil-fix-segfault-in-dsputil_init-with-gcc4.8.patch diff --git a/.gitignore b/.gitignore index 3906f06..60fb035 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -gst-libav-1.0.5.tar.xz -libav-0.8.5.tar.xz +gst-libav-1.0.6.tar.xz +libav-0.8.6.tar.xz diff --git a/gst-libav-configure-set-the-assembler.patch b/gst-libav-configure-set-the-assembler.patch new file mode 100644 index 0000000..a4b1c60 --- /dev/null +++ b/gst-libav-configure-set-the-assembler.patch @@ -0,0 +1,25 @@ +From 7c160e64686e6b9d971955246ffd0eccad9c3359 Mon Sep 17 00:00:00 2001 +From: Sebastian Dröge +Date: Thu, 07 Mar 2013 08:30:55 +0000 +Subject: configure: Set the assembler used for libav to $CC + +libav assumes that it's not just an assembler but something that +can also handle CPPFLAGS and other things. + +https://bugzilla.gnome.org/show_bug.cgi?id=694416 +--- +diff --git a/configure.ac b/configure.ac +index 22ede88..5317bd1 100644 +--- a/configure ++++ b/configure +@@ -342,7 +342,7 @@ else + fi + + if test x"$AS" != x; then +- emblibav_configure_args="$emblibav_configure_args --as=\\\"\\\$AS\\\"" ++ emblibav_configure_args="$emblibav_configure_args --as=\\\"\\\$CC\\\"" + fi + + if test x"$CC" != x; then +-- +cgit v0.9.0.2-2-gbebe diff --git a/gst-libav-fix-h264-decoding.patch b/gst-libav-fix-h264-decoding.patch deleted file mode 100644 index 7586974..0000000 --- a/gst-libav-fix-h264-decoding.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 879052472841d584e0aad21ac220131b586c1de5 Mon Sep 17 00:00:00 2001 -From: Tim-Philipp Müller -Date: Mon, 25 Feb 2013 10:38:09 +0000 -Subject: avviddec: fix H.264 decoding errors by disabling multi-threaded decoding - -Multi-threaded decoding does not work properly with the older libav 0.8 -version included in this gst-libav series, so just disable multi-threaded -decoding again entirely for now. (We could also switch from FF_THREAD_SLICE -to FF_THREAD_FRAME, but that may have other side-effects and just disabling -it seems safest for now). - -This works properly in git master with more recent libav 0.9.x versions. - -Adventurous users may still re-enable this functionality by setting -the GST_AVVIDDEC_MAX_THREADS environment variable to 'auto' or the -max. number of threads desired. - -https://bugzilla.gnome.org/show_bug.cgi?id=694230 ---- -diff --git a/ext/libav/gstavutils.c b/ext/libav/gstavutils.c -index 8555d8d..f7a80f6 100644 ---- a/ext/libav/gstavutils.c -+++ b/ext/libav/gstavutils.c -@@ -476,6 +476,7 @@ gst_ffmpeg_auto_max_threads (void) - if (n < 1) - n = 1; - -+ GST_INFO ("threads: %d", n); - g_once_init_leave (&n_threads, n); - } - -diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c -index 669a75d..caf3e2e 100644 ---- a/ext/libav/gstavviddec.c -+++ b/ext/libav/gstavviddec.c -@@ -106,7 +106,7 @@ struct _GstFFMpegVidDecClass - #define DEFAULT_SKIPFRAME 0 - #define DEFAULT_DIRECT_RENDERING TRUE - #define DEFAULT_DEBUG_MV FALSE --#define DEFAULT_MAX_THREADS 0 -+#define DEFAULT_MAX_THREADS 1 - - enum - { -@@ -470,14 +470,30 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder, - * supports it) */ - ffmpegdec->context->debug_mv = ffmpegdec->debug_mv; - -- if (ffmpegdec->max_threads == 0) { -- if (!(oclass->in_plugin->capabilities & CODEC_CAP_AUTO_THREADS)) -- ffmpegdec->context->thread_count = gst_ffmpeg_auto_max_threads (); -- else -- ffmpegdec->context->thread_count = 0; -- } else -- ffmpegdec->context->thread_count = ffmpegdec->max_threads; -+ { -+ const gchar *env = g_getenv ("GST_AVVIDDEC_MAX_THREADS"); -+ int max_threads = ffmpegdec->max_threads; -+ -+ if (env != NULL) { -+ if (g_str_equal (env, "auto")) -+ max_threads = 0; -+ else -+ max_threads = MAX (atoi (env), 0); -+ -+ if (max_threads != 1) { -+ GST_WARNING_OBJECT (ffmpegdec, "max threads forced to %d, this might " -+ "lead to decoding errors or artefacts", max_threads); -+ } -+ } - -+ if (max_threads == 0) { -+ if (!(oclass->in_plugin->capabilities & CODEC_CAP_AUTO_THREADS)) -+ ffmpegdec->context->thread_count = gst_ffmpeg_auto_max_threads (); -+ else -+ ffmpegdec->context->thread_count = 0; -+ } else -+ ffmpegdec->context->thread_count = max_threads; -+ } - ffmpegdec->context->thread_type = FF_THREAD_SLICE; - - /* open codec - we don't select an output pix_fmt yet, --- -cgit v0.9.0.2-2-gbebe diff --git a/gstreamer1-libav.spec b/gstreamer1-libav.spec index 2bedc22..bca8f49 100644 --- a/gstreamer1-libav.spec +++ b/gstreamer1-libav.spec @@ -1,16 +1,15 @@ Name: gstreamer1-libav -Version: 1.0.5 -Release: 2%{?dist} +Version: 1.0.6 +Release: 1%{?dist} Summary: GStreamer 1.0 libav-based plug-ins Group: Applications/Multimedia License: LGPLv2+ URL: http://gstreamer.freedesktop.org/ Source0: http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-%{version}.tar.xz # We drop in a newer libav to get all the security bugfixes from there! -Source1: http://libav.org/releases/libav-0.8.5.tar.xz +Source1: http://libav.org/releases/libav-0.8.6.tar.xz Patch0: gst-ffmpeg-0.10.12-ChangeLog-UTF-8.patch -Patch1: gst-libav-fix-h264-decoding.patch -Patch2: libav-dsputil-fix-segfault-in-dsputil_init-with-gcc4.8.patch +Patch1: gst-libav-configure-set-the-assembler.patch BuildRequires: gstreamer1-devel >= 1.0.0 BuildRequires: gstreamer1-plugins-base-devel >= 1.0.0 BuildRequires: orc-devel bzip2-devel zlib-devel @@ -33,11 +32,9 @@ This package provides libav-based GStreamer plug-ins. %setup -q -n gst-libav-%{version} -a 1 %patch0 -p1 %patch1 -p1 -pushd libav-0.8.5 -%patch2 -p1 -popd +chmod +x configure rm -r gst-libs/ext/libav -mv libav-0.8.5 gst-libs/ext/libav +mv libav-0.8.6 gst-libs/ext/libav %build @@ -62,6 +59,11 @@ rm $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgst*.la %changelog +* Mon Mar 25 2013 Hans de Goede - 1.0.6-1 +- Rebase to 1.0.6 +- Upgrade the buildin libav to 0.8.6 to get all the security fixes from + upstream libav + * Sun Mar 10 2013 Hans de Goede - 1.0.5-2 - Add a patch from upstream git to fix h264 decoding artifacts (rf#2710) - Add a patch from upstream libav to fix miscompilation with gcc-4.8 diff --git a/libav-dsputil-fix-segfault-in-dsputil_init-with-gcc4.8.patch b/libav-dsputil-fix-segfault-in-dsputil_init-with-gcc4.8.patch deleted file mode 100644 index ceede06..0000000 --- a/libav-dsputil-fix-segfault-in-dsputil_init-with-gcc4.8.patch +++ /dev/null @@ -1,44 +0,0 @@ -From ae8f132ace291534ed64023029023c2338f8d3bb Mon Sep 17 00:00:00 2001 -From: Sebastian Keller -Date: Sat, 9 Mar 2013 23:57:14 +0100 -Subject: [PATCH] dsputil: fix segfault in dsputil_init with gcc 4.8 - ---- - libavcodec/dsputil.c | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c -index 66f1f93..621b00c 100644 ---- a/libavcodec/dsputil.c -+++ b/libavcodec/dsputil.c -@@ -2788,7 +2788,7 @@ int ff_check_alignment(void){ - - av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx) - { -- int i; -+ int i, j; - - ff_check_alignment(); - -@@ -3154,11 +3154,13 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx) - if (ARCH_SH4) dsputil_init_sh4 (c, avctx); - if (ARCH_BFIN) dsputil_init_bfin (c, avctx); - -- for(i=0; i<64; i++){ -- if(!c->put_2tap_qpel_pixels_tab[0][i]) -- c->put_2tap_qpel_pixels_tab[0][i]= c->put_h264_qpel_pixels_tab[0][i]; -- if(!c->avg_2tap_qpel_pixels_tab[0][i]) -- c->avg_2tap_qpel_pixels_tab[0][i]= c->avg_h264_qpel_pixels_tab[0][i]; -+ for(i=0; i<4; i++){ -+ for(j=0; j<16; j++) { -+ if(!c->put_2tap_qpel_pixels_tab[i][j]) -+ c->put_2tap_qpel_pixels_tab[i][j]= c->put_h264_qpel_pixels_tab[i][j]; -+ if(!c->avg_2tap_qpel_pixels_tab[i][j]) -+ c->avg_2tap_qpel_pixels_tab[i][j]= c->avg_h264_qpel_pixels_tab[i][j]; -+ } - } - - ff_init_scantable_permutation(c->idct_permutation, --- -1.8.1.4 - diff --git a/sources b/sources index 0322dd7..9ba7a86 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -00011aa062ce734ba86da499f800269e gst-libav-1.0.5.tar.xz -3f0fd111575e91c8d57bd8b4d5e3802a libav-0.8.5.tar.xz +07e5399c44346a95aafc1d4533125774 gst-libav-1.0.6.tar.xz +c4a57b81a110c1b72c1e875e222ab8d2 libav-0.8.6.tar.xz