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 similarity index 99% rename from Doxyfile rename to 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)