On Fri, Jul 08, 2011 at 03:39:35PM -0700, Alex Converse wrote: > From a2a0712faaa96bf33652b58ae136563778e855a4 Mon Sep 17 00:00:00 2001 > From: Nicolas George <[email protected]> > Date: Sat, 16 Apr 2011 17:45:30 +0200 > Subject: [PATCH 2/2] Xiph CELT/Opus decoder using libcelt. > > Signed-off-by: Alex Converse <[email protected]> > --- > configure | 5 ++ > libavcodec/Makefile | 1 + > libavcodec/allcodecs.c | 1 + > libavcodec/libcelt_dec.c | 147 > ++++++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 154 insertions(+), 0 deletions(-) > create mode 100644 libavcodec/libcelt_dec.c
We have no underscore in the other external library decoder filenames, so please drop the underscore, but squash $attached into your patch first. Diego
>From be20283feb911d71b4a4752e7eb43b82849672e0 Mon Sep 17 00:00:00 2001 From: Diego Biurrun <[email protected]> Date: Sat, 9 Jul 2011 01:16:19 +0200 Subject: [PATCH 1/2] libceltdec cosmetics --- libavcodec/libcelt_dec.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/libavcodec/libcelt_dec.c b/libavcodec/libcelt_dec.c index 37d4985..ae9d753 100644 --- a/libavcodec/libcelt_dec.c +++ b/libavcodec/libcelt_dec.c @@ -21,8 +21,9 @@ #include <celt/celt.h> #include <celt/celt_header.h> -#include "avcodec.h" + #include "libavutil/intreadwrite.h" +#include "avcodec.h" struct libcelt_context { CELTMode *mode; @@ -34,10 +35,10 @@ struct libcelt_context { static int celt_error_to_averror(int err) { switch (err) { - case CELT_CORRUPTED_DATA: return AVERROR_INVALIDDATA; - case CELT_UNIMPLEMENTED: return AVERROR(ENOTSUP); - case CELT_ALLOC_FAIL: return AVERROR(ENOMEM); - default: return AVERROR(EINVAL); + case CELT_CORRUPTED_DATA: return AVERROR_INVALIDDATA; + case CELT_UNIMPLEMENTED: return AVERROR(ENOTSUP); + case CELT_ALLOC_FAIL: return AVERROR(ENOMEM); + default: return AVERROR(EINVAL); } } @@ -63,7 +64,7 @@ static av_cold int libcelt_decode_init(AVCodecContext *c) return AVERROR(EINVAL); celt->frame_bytes = c->frame_size * c->channels * av_get_bytes_per_sample(c->sample_fmt); - celt->mode = celt_mode_create(c->sample_rate, c->frame_size, &err); + celt->mode = celt_mode_create(c->sample_rate, c->frame_size, &err); if (!celt->mode) return celt_error_to_averror(err); @@ -83,7 +84,7 @@ static av_cold int libcelt_decode_init(AVCodecContext *c) celt->discard *= c->channels * av_get_bytes_per_sample(c->sample_fmt); } if (c->extradata_size >= 8) { - unsigned version = AV_RL32(c->extradata + 4); + unsigned version = AV_RL32(c->extradata + 4); unsigned lib_version = celt_bitstream_version_hack(celt->mode); if (version != lib_version) av_log(c, AV_LOG_WARNING, -- 1.7.1
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
