[arch-commits] Commit in alsa-plugins/trunk (2 files)

2016-03-08 Thread Anatol Pomozov
Date: Tuesday, March 8, 2016 @ 23:30:22
  Author: anatolik
Revision: 261233

FS#48454 fix pcm_a52.c broken by the recent ffmpeg 3 update

The patch has been sent upstream but not reviewed yet

Added:
  alsa-plugins/trunk/0002-replace-avcodec_alloc_free_frame.patch
Modified:
  alsa-plugins/trunk/PKGBUILD

-+
 0002-replace-avcodec_alloc_free_frame.patch |   32 ++
 PKGBUILD|9 ---
 2 files changed, 38 insertions(+), 3 deletions(-)

Added: 0002-replace-avcodec_alloc_free_frame.patch
===
--- 0002-replace-avcodec_alloc_free_frame.patch (rev 0)
+++ 0002-replace-avcodec_alloc_free_frame.patch 2016-03-08 22:30:22 UTC (rev 
261233)
@@ -0,0 +1,32 @@
+--- a/a52/pcm_a52.c.orig   2016-03-04 18:21:12.606805770 +0100
 b/a52/pcm_a52.c2016-03-04 18:34:22.653240501 +0100
+@@ -62,6 +62,11 @@
+ #define AV_CODEC_ID_AC3 CODEC_ID_AC3
+ #endif
+ 
++#if LIBAVCODEC_VERSION_INT < 0x371c01
++#define av_frame_alloc avcodec_alloc_frame
++#define av_frame_free avcodec_free_frame
++#endif
++
+ struct a52_ctx {
+   snd_pcm_ioplug_t io;
+   snd_pcm_t *slave;
+@@ -513,7 +518,7 @@
+   rec->inbuf = NULL;
+   }
+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0)
+-  avcodec_free_frame(>frame);
++  av_frame_free(>frame);
+ #else
+   av_freep(>frame);
+ #endif
+@@ -557,7 +562,7 @@
+ {
+   struct a52_ctx *rec = io->private_data;
+ #ifdef USE_AVCODEC_FRAME
+-  rec->frame = avcodec_alloc_frame();
++  rec->frame = av_frame_alloc();
+   if (!rec->frame)
+   return -ENOMEM;
+   if (av_samples_alloc(rec->frame->data, rec->frame->linesize,

Modified: PKGBUILD
===
--- PKGBUILD2016-03-08 22:21:23 UTC (rev 261232)
+++ PKGBUILD2016-03-08 22:30:22 UTC (rev 261233)
@@ -5,7 +5,7 @@
 
 pkgname=alsa-plugins
 pkgver=1.1.0
-pkgrel=2
+pkgrel=3
 pkgdesc="Extra alsa plugins"
 arch=(i686 x86_64)
 url="http://www.alsa-project.org;
@@ -18,13 +18,16 @@
 'libsamplerate: libsamplerate resampling plugin'
 'speex: libspeexdsp resampling plugin')
 source=("ftp://ftp.alsa-project.org/pub/plugins/$pkgname-$pkgver.tar.bz2;
-0001-Do-not-use-deprecated-FFmpeg-API.patch)
+0001-Do-not-use-deprecated-FFmpeg-API.patch
+0002-replace-avcodec_alloc_free_frame.patch)
 sha1sums=('1436db17989468d082691b817b338e44ba932c4b'
-  '6b032eb20ea1222e78dc862e61e5dad70a8ef2bb')
+  '6b032eb20ea1222e78dc862e61e5dad70a8ef2bb'
+  'dc42d1b9ada91d26fbddad2aaf42931edf0b8e9d')
 
 prepare() {
   cd $pkgname-$pkgver
   patch -p1 < ../0001-Do-not-use-deprecated-FFmpeg-API.patch
+  patch -p1 < ../0002-replace-avcodec_alloc_free_frame.patch
 }
 
 build() {


[arch-commits] Commit in alsa-plugins/trunk (2 files)

2016-02-15 Thread Anatol Pomozov
Date: Tuesday, February 16, 2016 @ 02:52:05
  Author: anatolik
Revision: 259367

upgpkg: alsa-plugins 1.1.0-2

Add ffmpeg 3.0 compat patch

Added:
  alsa-plugins/trunk/0001-Do-not-use-deprecated-FFmpeg-API.patch
Modified:
  alsa-plugins/trunk/PKGBUILD

-+
 0001-Do-not-use-deprecated-FFmpeg-API.patch |   26 ++
 PKGBUILD|   10 ++
 2 files changed, 32 insertions(+), 4 deletions(-)

Added: 0001-Do-not-use-deprecated-FFmpeg-API.patch
===
--- 0001-Do-not-use-deprecated-FFmpeg-API.patch (rev 0)
+++ 0001-Do-not-use-deprecated-FFmpeg-API.patch 2016-02-16 01:52:05 UTC (rev 
259367)
@@ -0,0 +1,26 @@
+From a257818815ce00349a76aaf6c7826070a57c06f7 Mon Sep 17 00:00:00 2001
+From: Anatol Pomozov 
+Date: Mon, 15 Feb 2016 17:40:41 -0800
+Subject: [PATCH] Do not use deprecated FFmpeg API
+
+This API as been removed in ffmpeg 3.0 (commit 2d40968dd3ff17b12f7)
+---
+ a52/pcm_a52.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/a52/pcm_a52.c b/a52/pcm_a52.c
+index 88529eb..6fad77d 100644
+--- a/a52/pcm_a52.c
 b/a52/pcm_a52.c
+@@ -39,7 +39,7 @@
+ #endif
+ 
+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 34, 0)
+-#include 
++#include 
+ #include 
+ #define USE_AVCODEC_FRAME
+ #endif
+-- 
+2.7.1
+

Modified: PKGBUILD
===
--- PKGBUILD2016-02-16 01:48:42 UTC (rev 259366)
+++ PKGBUILD2016-02-16 01:52:05 UTC (rev 259367)
@@ -5,7 +5,7 @@
 
 pkgname=alsa-plugins
 pkgver=1.1.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Extra alsa plugins"
 arch=(i686 x86_64)
 url="http://www.alsa-project.org;
@@ -17,11 +17,14 @@
 'ffmpeg: libavcodec resampling plugin, a52 plugin'
 'libsamplerate: libsamplerate resampling plugin'
 'speex: libspeexdsp resampling plugin')
-source=("ftp://ftp.alsa-project.org/pub/plugins/$pkgname-$pkgver.tar.bz2;)
+source=("ftp://ftp.alsa-project.org/pub/plugins/$pkgname-$pkgver.tar.bz2;
+0001-Do-not-use-deprecated-FFmpeg-API.patch)
+sha1sums=('1436db17989468d082691b817b338e44ba932c4b'
+  '6b032eb20ea1222e78dc862e61e5dad70a8ef2bb')
 
 prepare() {
   cd $pkgname-$pkgver
-  sed -i 's/ && LIBAVCODEC_VERSION_MINOR >= 34//' a52/pcm_a52.c
+  patch -p1 < ../0001-Do-not-use-deprecated-FFmpeg-API.patch
 }
 
 build() {
@@ -38,4 +41,3 @@
   install -d "$pkgdir/usr/share/doc/$pkgname"
   install -m644 doc/README* doc/*.txt "$pkgdir/usr/share/doc/$pkgname/"
 }
-md5sums=('b123e42ed881b9adbc99e4040f257c39')


[arch-commits] Commit in alsa-plugins/trunk (2 files)

2010-11-19 Thread Jan Steffens
Date: Friday, November 19, 2010 @ 11:25:41
  Author: heftig
Revision: 99957

Oops, forgot patches

Added:
  alsa-plugins/trunk/Add_handle_underrun_option.patch
  alsa-plugins/trunk/Fix_invalid_buffer_pointer_return_value.patch

---+
 Add_handle_underrun_option.patch  |   86 
 Fix_invalid_buffer_pointer_return_value.patch |   75 
 2 files changed, 161 insertions(+)

Added: Add_handle_underrun_option.patch
===
--- Add_handle_underrun_option.patch(rev 0)
+++ Add_handle_underrun_option.patch2010-11-19 16:25:41 UTC (rev 99957)
@@ -0,0 +1,86 @@
+From: Takashi Iwai ti...@suse.de
+Date: Fri, 9 Jul 2010 12:05:03 + (+0200)
+Subject: pulse: Add handle_underrun option
+X-Git-Url: 
http://git.alsa-project.org/?p=alsa-plugins.git;a=commitdiff_plain;h=c20d516e229620129ee20175d8fee8511cc3a4bd
+
+pulse: Add handle_underrun option
+
+Added a config option handle_underrun to specify whether pulse plugin
+handles the underrun reported from PA.  The default value is now set to
+false, i.e. it will ignore underruns in PA (for good reasons below).
+You can take back to the old behavior by setting handle_underrun true.
+
+The original idea was brought by David Henningsson di...@ubuntu.com,
+while this patch is simplified and makes the behavior configurable.
+
+The reasons for avoiding underruns (cited from David's original patch):
+
+ Reporting underruns to ALSA seems to do more bad than good, for these reasons:
+ * If pulseaudio gets an underrun, the normal way to end that underrun is to
+   feed it with more buffers. This is different from the ALSA way of dealing
+   with underruns, which requires hardware buffer pointers to be reset.
+ * In addition, underrun signals are delivered asynchronously from pulseaudio.
+   This means that there might be more buffers on the way to pulseaudio when
+   the underrun is reported, making the underrun obsolete. Unfortunately,
+   there is currently no known way to determine whether this is the case or
+   not.
+
+Signed-off-by: Takashi Iwai ti...@suse.de
+---
+
+diff --git a/pulse/pcm_pulse.c b/pulse/pcm_pulse.c
+index b322898..2df0a80 100644
+--- a/pulse/pcm_pulse.c
 b/pulse/pcm_pulse.c
+@@ -39,6 +39,7 @@ typedef struct snd_pcm_pulse {
+   size_t last_size;
+   size_t ptr;
+   int underrun;
++  int handle_underrun;
+ 
+   size_t offset;
+ 
+@@ -696,8 +697,9 @@ static int pulse_prepare(snd_pcm_ioplug_t * io)
+   if (io-stream == SND_PCM_STREAM_PLAYBACK) {
+   pa_stream_set_write_callback(pcm-stream,
+stream_request_cb, pcm);
+-  pa_stream_set_underflow_callback(pcm-stream,
+-   stream_underrun_cb, pcm);
++  if (pcm-handle_underrun)
++  pa_stream_set_underflow_callback(pcm-stream,
++   stream_underrun_cb, 
pcm);
+   r = pa_stream_connect_playback(pcm-stream, pcm-device,
+  pcm-buffer_attr,
+  PA_STREAM_AUTO_TIMING_UPDATE |
+@@ -980,6 +982,7 @@ SND_PCM_PLUGIN_DEFINE_FUNC(pulse)
+   snd_config_iterator_t i, next;
+   const char *server = NULL;
+   const char *device = NULL;
++  int handle_underrun = 0;
+   int err;
+   snd_pcm_pulse_t *pcm;
+ 
+@@ -1005,6 +1008,14 @@ SND_PCM_PLUGIN_DEFINE_FUNC(pulse)
+   }
+   continue;
+   }
++  if (strcmp(id, handle_underrun) == 0) {
++  if ((err = snd_config_get_bool(n))  0) {
++  SNDERR(Invalid value for %s, id);
++  return -EINVAL;
++  }
++  handle_underrun = err;
++  continue;
++  }
+   SNDERR(Unknown field %s, id);
+   return -EINVAL;
+   }
+@@ -1028,6 +1039,8 @@ SND_PCM_PLUGIN_DEFINE_FUNC(pulse)
+   goto error;
+   }
+ 
++  pcm-handle_underrun = handle_underrun;
++
+   err = pulse_connect(pcm-p, server);
+   if (err  0)
+   goto error;

Added: Fix_invalid_buffer_pointer_return_value.patch
===
--- Fix_invalid_buffer_pointer_return_value.patch   
(rev 0)
+++ Fix_invalid_buffer_pointer_return_value.patch   2010-11-19 16:25:41 UTC 
(rev 99957)
@@ -0,0 +1,75 @@
+From: David Henningsson di...@ubuntu.com
+Date: Sat, 9 Jan 2010 08:09:14 + (+0100)
+Subject: pulse: Fix invalid buffer pointer return value
+X-Git-Url: 
http://git.alsa-project.org/?p=alsa-plugins.git;a=commitdiff_plain;h=1675414eca06dcfc20899adf104ace05acfe26a0
+
+pulse: Fix invalid