[SCM] libav/master: backport patch from upstream to make samplefmt auto-aling buffers (Closes: #713856)
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Fri Jul 12 22:03:02 UTC 2013
The following commit has been merged in the master branch:
commit 691f104c910064486e1672ccbab656afcfd97379
Author: Reinhard Tartler <siretart at tauware.de>
Date: Sat Jul 13 00:02:20 2013 +0200
backport patch from upstream to make samplefmt auto-aling buffers (Closes: #713856)
Fixes for instance the alsa-plugin a52 plugin
diff --git a/debian/patches/05-fix.713856.patch b/debian/patches/05-fix.713856.patch
new file mode 100644
index 0000000..d11d235
--- /dev/null
+++ b/debian/patches/05-fix.713856.patch
@@ -0,0 +1,65 @@
+From 0109a09dc3850eb5dbff84a7bb50eb252a5a8f22 Mon Sep 17 00:00:00 2001
+From: Justin Ruggles <justin.ruggles at gmail.com>
+Date: Tue, 27 Mar 2012 21:31:14 -0400
+Subject: [PATCH] avutil: use align == 0 for default alignment in audio sample
+ buffer functions
+Bug-Debian: http://bugs.debian.org/713856
+
+---
+ libavutil/avutil.h | 2 +-
+ libavutil/samplefmt.c | 4 ++++
+ libavutil/samplefmt.h | 5 +++--
+ 3 files changed, 8 insertions(+), 3 deletions(-)
+
+--- a/libavutil/avutil.h
++++ b/libavutil/avutil.h
+@@ -155,7 +155,7 @@
+
+ #define LIBAVUTIL_VERSION_MAJOR 51
+ #define LIBAVUTIL_VERSION_MINOR 22
+-#define LIBAVUTIL_VERSION_MICRO 1
++#define LIBAVUTIL_VERSION_MICRO 2
+
+ #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
+ LIBAVUTIL_VERSION_MINOR, \
+--- a/libavutil/samplefmt.c
++++ b/libavutil/samplefmt.c
+@@ -104,6 +104,10 @@ int av_samples_get_buffer_size(int *line
+ if (!sample_size || nb_samples <= 0 || nb_channels <= 0)
+ return AVERROR(EINVAL);
+
++ /* auto-select alignment if not specified */
++ if (!align)
++ align = 32;
++
+ /* check for integer overflow */
+ if (nb_channels > INT_MAX / align ||
+ (int64_t)nb_channels * nb_samples > (INT_MAX - (align * nb_channels)) / sample_size)
+--- a/libavutil/samplefmt.h
++++ b/libavutil/samplefmt.h
+@@ -99,6 +99,7 @@ int av_sample_fmt_is_planar(enum AVSampl
+ * @param nb_channels the number of channels
+ * @param nb_samples the number of samples in a single channel
+ * @param sample_fmt the sample format
++ * @param align buffer size alignment (0 = default, 1 = no alignment)
+ * @return required buffer size, or negative error code on failure
+ */
+ int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
+@@ -122,7 +123,7 @@ int av_samples_get_buffer_size(int *line
+ * @param nb_channels the number of channels
+ * @param nb_samples the number of samples in a single channel
+ * @param sample_fmt the sample format
+- * @param align buffer size alignment (1 = no alignment required)
++ * @param align buffer size alignment (0 = default, 1 = no alignment)
+ * @return 0 on success or a negative error code on failure
+ */
+ int av_samples_fill_arrays(uint8_t **audio_data, int *linesize, uint8_t *buf,
+@@ -138,7 +139,7 @@ int av_samples_fill_arrays(uint8_t **aud
+ * @param[out] linesize aligned size for audio buffer(s)
+ * @param nb_channels number of audio channels
+ * @param nb_samples number of samples per channel
+- * @param align buffer size alignment (1 = no alignment required)
++ * @param align buffer size alignment (0 = default, 1 = no alignment)
+ * @return 0 on success or a negative error code on failure
+ * @see av_samples_fill_arrays()
+ */
diff --git a/debian/patches/series b/debian/patches/series
index 66758ef..8a8b3f0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
01-Tweak-doxygen-config.patch
03-disable-configuration-warnings.patch
04-ffmpeg-warning-change.patch
+05-fix.713856.patch
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list