aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-24 00:19:55 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-24 02:30:41 +0200
commit3bbf3f7e42247b7a8b34b1e8cc891b59e1327bb8 (patch)
treebf3b0776b76e0f5c4c331d9d069f16e3c0236a9c /libavutil
parent2e8f19d26f3ef7e804a7f9f9811e4b538e0a5969 (diff)
parent7521c4bab28ff3a622171be5b39a6b210f4263f0 (diff)
downloadffmpeg-3bbf3f7e42247b7a8b34b1e8cc891b59e1327bb8.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: matroska: Clear prev_pkt between seeks. avutil: change default buffer size alignment for sample buffer functions audemux: Add a sanity check for the number of channels Remove libdirac decoder. matroska: Add incremental parsing of clusters. avconv: fix off by one check in complex_filter mpegts: Try seeking back even for nonseekable protocols swscale: K&R formatting cosmetics (part III) Conflicts: configure doc/general.texi doc/platform.texi ffmpeg.c libavcodec/Makefile libavcodec/allcodecs.c libavcodec/libdirac.h libavcodec/libdiracdec.c libavformat/au.c libavformat/mpegts.c libswscale/input.c tests/ref/seek/lavf_mkv Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/samplefmt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavutil/samplefmt.c b/libavutil/samplefmt.c
index 98dacb1f66..69939c48f0 100644
--- a/libavutil/samplefmt.c
+++ b/libavutil/samplefmt.c
@@ -133,8 +133,10 @@ int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
return AVERROR(EINVAL);
/* auto-select alignment if not specified */
- if (!align)
- align = 32;
+ if (!align) {
+ align = 1;
+ nb_samples = FFALIGN(nb_samples, 32);
+ }
/* check for integer overflow */
if (nb_channels > INT_MAX / align ||