diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-02-07 01:40:29 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-02-07 01:40:29 +0100 |
commit | b479e016128efe42e8b26ceb6c1b4a95b6d0c791 (patch) | |
tree | 30ab5e543d733f62a81deecce3a15404e46ce4f4 /libavcodec/v210enc.c | |
parent | 6ba2505a0e894eeb326cfee95df9e1c030bcde3e (diff) | |
parent | d016d3074cc084ea813e389f046eee01ecd48b7e (diff) | |
download | ffmpeg-b479e016128efe42e8b26ceb6c1b4a95b6d0c791.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
Revert "v210enc: use FFALIGN()"
doxygen: Do not include license boilerplates in Doxygen comment blocks.
avplay: reset decoder flush state when seeking
ape: skip packets with invalid size
ape: calculate final packet size instead of guessing
ape: stop reading after the last frame has been read
ape: return AVERROR_EOF instead of AVERROR(EIO) when demuxing is finished
ape: return error if seeking to the current packet fails in ape_read_packet()
avcodec: Clarify AVFrame member documentation.
v210dec: check for coded_frame allocation failure
v210enc: use stride as it is already calculated
v210enc: use FFALIGN()
v210enc: return proper AVERROR codes instead of -1
v210enc: do not set coded_frame->key_frame
v210enc: check for coded_frame allocation failure
drawtext: add 'fix_bounds' option on coords fixing
drawtext: fix text_{w, h} expression vars
drawtext: add missing braces around an if() block.
Conflicts:
libavcodec/arm/vp8.h
libavcodec/arm/vp8dsp_init_arm.c
libavcodec/v210dec.c
libavfilter/vf_drawtext.c
libavformat/ape.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/v210enc.c')
-rw-r--r-- | libavcodec/v210enc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c index 947797df14..a2efb5e83f 100644 --- a/libavcodec/v210enc.c +++ b/libavcodec/v210enc.c @@ -28,7 +28,7 @@ static av_cold int encode_init(AVCodecContext *avctx) { if (avctx->width & 1) { av_log(avctx, AV_LOG_ERROR, "v210 needs even width\n"); - return -1; + return AVERROR(EINVAL); } if (avctx->pix_fmt != PIX_FMT_YUV422P10) { @@ -62,9 +62,9 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, uint8_t *p = buf; uint8_t *pdst = buf; - if (buf_size < aligned_width * avctx->height * 8 / 3) { + if (buf_size < avctx->height * stride) { av_log(avctx, AV_LOG_ERROR, "output buffer too small\n"); - return -1; + return AVERROR(ENOMEM); } #define CLIP(v) av_clip(v, 4, 1019) |