aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-24 14:18:17 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-24 14:18:17 +0200
commit719fde47ca641edd4321f384579438f930bc50eb (patch)
tree577820b177126467a82a115aebf759cd04611d78
parent5cf794e0c1f7b651de4b1a61a6786fb71e9679b3 (diff)
parentc68317ebbe4915035df0b08c23eea7a0b80ab881 (diff)
downloadffmpeg-719fde47ca641edd4321f384579438f930bc50eb.tar.gz
Merge commit 'c68317ebbe4915035df0b08c23eea7a0b80ab881'
* commit 'c68317ebbe4915035df0b08c23eea7a0b80ab881': lavc: fix documentation for AVCodecContext.delay atrac3: return an error if extradata_size is not a specific known size lavc: use the correct API version guard macro for avcodec_encode_audio() Move Doxyfile into the doc/ subdirectory doxygen: Build Doxygen documentation in the doc/ subdirectory dfa: use av_memcpy_backptr() where previously impossible av_memcpy_backptr: Drop no longer necessary malloc padding Conflicts: .gitignore libavcodec/avcodec.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--.gitignore2
-rw-r--r--doc/Doxyfile (renamed from Doxyfile)2
-rw-r--r--libavcodec/atrac3.c1
-rw-r--r--libavcodec/avcodec.h2
-rw-r--r--libavcodec/dfa.c6
-rw-r--r--libavcodec/eatgv.c3
-rw-r--r--libavcodec/lcldec.c3
-rw-r--r--libavcodec/utils.c2
8 files changed, 11 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index 0b00f07e50..a2d19358a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,8 +38,8 @@
/doc/examples/muxing
/doc/examples/scaling_video
/doc/fate.txt
+/doc/doxy/html/
/doc/print_options
-/doxy/
/libavcodec/*_tablegen
/libavcodec/*_tables.c
/libavcodec/*_tables.h
diff --git a/Doxyfile b/doc/Doxyfile
index b91f351800..4d2ba333d0 100644
--- a/Doxyfile
+++ b/doc/Doxyfile
@@ -44,7 +44,7 @@ PROJECT_LOGO =
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY = doxy
+OUTPUT_DIRECTORY = doc/doxy
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 02047ef5f9..abc2927840 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -913,6 +913,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
} else {
av_log(NULL, AV_LOG_ERROR, "Unknown extradata size %d.\n",
avctx->extradata_size);
+ return AVERROR(EINVAL);
}
/* Check the extradata */
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 8ee08148b5..0374de47f2 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1607,6 +1607,8 @@ typedef struct AVCodecContext {
int ticks_per_frame;
/**
+ * Codec delay.
+ *
* Encoding: Number of frames delay there will be from the encoder input to
* the decoder output. (we assume the decoder matches the spec)
* Decoding: Number of frames delay in addition to what a standard decoder
diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
index 94a4265362..42c37c831f 100644
--- a/libavcodec/dfa.c
+++ b/libavcodec/dfa.c
@@ -45,7 +45,7 @@ static av_cold int dfa_decode_init(AVCodecContext *avctx)
av_assert0(av_image_check_size(avctx->width, avctx->height, 0, avctx) >= 0);
- s->frame_buf = av_mallocz(avctx->width * avctx->height + AV_LZO_OUTPUT_PADDING);
+ s->frame_buf = av_mallocz(avctx->width * avctx->height);
if (!s->frame_buf)
return AVERROR(ENOMEM);
@@ -126,9 +126,7 @@ static int decode_dsw1(GetByteContext *gb, uint8_t *frame, int width, int height
count = ((v >> 13) + 2) << 1;
if (frame - frame_start < offset || frame_end - frame < count)
return AVERROR_INVALIDDATA;
- // can't use av_memcpy_backptr() since it can overwrite following pixels
- for (v = 0; v < count; v++)
- frame[v] = frame[v - offset];
+ av_memcpy_backptr(frame, offset, count);
frame += count;
} else if (bitbuf & (mask << 1)) {
frame += bytestream2_get_le16(gb);
diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c
index 69e74ca2a4..c986c14e64 100644
--- a/libavcodec/eatgv.c
+++ b/libavcodec/eatgv.c
@@ -301,8 +301,7 @@ static int tgv_decode_frame(AVCodecContext *avctx,
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
s->frame.linesize[0] = s->width;
- /* allocate additional 12 bytes to accommodate av_memcpy_backptr() OUTBUF_PADDED optimisation */
- s->frame.data[0] = av_malloc(s->width*s->height + 12);
+ s->frame.data[0] = av_malloc(s->width * s->height);
if (!s->frame.data[0])
return AVERROR(ENOMEM);
s->frame.data[1] = av_malloc(AVPALETTE_SIZE);
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index ab188e28da..475ffdd55a 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -482,7 +482,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
{
LclDecContext * const c = avctx->priv_data;
unsigned int basesize = avctx->width * avctx->height;
- unsigned int max_basesize = FFALIGN(avctx->width, 4) * FFALIGN(avctx->height, 4) + AV_LZO_OUTPUT_PADDING;
+ unsigned int max_basesize = FFALIGN(avctx->width, 4) *
+ FFALIGN(avctx->height, 4);
unsigned int max_decomp_size;
avcodec_get_frame_defaults(&c->pic);
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index c7c7c44fa3..8e7dc0f869 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1328,7 +1328,7 @@ end:
return ret;
}
-#if FF_API_OLD_DECODE_AUDIO
+#if FF_API_OLD_ENCODE_AUDIO
int attribute_align_arg avcodec_encode_audio(AVCodecContext *avctx,
uint8_t *buf, int buf_size,
const short *samples)