Mercurial > libavcodec.hg
changeset 4523:6af87c369a8e libavcodec
doxy for avcodec_encode_video()
author | michael |
---|---|
date | Wed, 14 Feb 2007 10:50:01 +0000 |
parents | 895b076101a8 |
children | 722e3199c56e |
files | utils.c |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Wed Feb 14 09:57:41 2007 +0000 +++ b/utils.c Wed Feb 14 10:50:01 2007 +0000 @@ -860,6 +860,13 @@ return 0; } +/** + * encode a frame. + * @param buf buffer for the bitstream of encoded frame + * @param buf_size the size of the buffer in bytes + * @param pict the input picture to encode, in avctx.pix_fmt + * @return -1 if error + */ int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVFrame *pict) { @@ -938,7 +945,7 @@ if(*frame_size_ptr < FF_MIN_BUFFER_SIZE || *frame_size_ptr < avctx->channels * avctx->frame_size * sizeof(int16_t) || *frame_size_ptr < buf_size){ - av_log(avctx, AV_LOG_ERROR, "buffer too small\n"); + av_log(avctx, AV_LOG_ERROR, "buffer %d too small\n", *frame_size_ptr); return -1; } if((avctx->codec->capabilities & CODEC_CAP_DELAY) || buf_size){