[libav-commits] avcodec: use align == 0 for default alignment in avcodec_fill_audio_frame()

Justin Ruggles git at libav.org
Mon Apr 9 17:26:28 CEST 2012


Module: libav
Branch: master
Commit: c58846f3a8b64def1368f0d1bf42e15c75d09a85

Author:    Justin Ruggles <justin.ruggles at gmail.com>
Committer: Justin Ruggles <justin.ruggles at gmail.com>
Date:      Thu Apr  5 19:01:21 2012 -0400

avcodec: use align == 0 for default alignment in avcodec_fill_audio_frame()

Use default alignment in audio_get_buffer()

---

 libavcodec/avcodec.h |    2 +-
 libavcodec/utils.c   |    4 ++--
 libavcodec/version.h |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 3af4df1..ef43962 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3828,7 +3828,7 @@ int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
  * @param sample_fmt  sample format
  * @param buf         buffer to use for frame data
  * @param buf_size    size of buffer
- * @param align       plane size sample alignment
+ * @param align       plane size sample alignment (0 = default)
  * @return            0 on success, negative error code on failure
  */
 int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 4037bfd..58b7865 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -292,7 +292,7 @@ static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame)
 
     buf_size = av_samples_get_buffer_size(NULL, avctx->channels,
                                           frame->nb_samples, avctx->sample_fmt,
-                                          32);
+                                          0);
     if (buf_size < 0)
         return AVERROR(EINVAL);
 
@@ -334,7 +334,7 @@ static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame)
         }
         if ((ret = avcodec_fill_audio_frame(frame, avctx->channels,
                                             avctx->sample_fmt, buf->data[0],
-                                            buf->audio_data_size, 32)))
+                                            buf->audio_data_size, 0)))
             return ret;
 
         if (frame->extended_data == frame->data)
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 9e42a27..5719e7f 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -22,7 +22,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR 54
 #define LIBAVCODEC_VERSION_MINOR 11
-#define LIBAVCODEC_VERSION_MICRO  0
+#define LIBAVCODEC_VERSION_MICRO  1
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \



More information about the libav-commits mailing list