mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 10:22:10 +00:00
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>
This commit is contained in:
commit
719fde47ca
2
.gitignore
vendored
2
.gitignore
vendored
@ -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
|
||||
|
@ -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
|
@ -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 */
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user