Merge commit '594d4d5df3c70404168701dd5c90b7e6e5587793'

* commit '594d4d5df3c70404168701dd5c90b7e6e5587793':
  lavc: add a wrapper for AVCodecContext.get_buffer().

Conflicts:
	libavcodec/4xm.c
	libavcodec/8svx.c
	libavcodec/bmv.c
	libavcodec/cljr.c
	libavcodec/cscd.c
	libavcodec/dnxhddec.c
	libavcodec/dpcm.c
	libavcodec/dpx.c
	libavcodec/eacmv.c
	libavcodec/eamad.c
	libavcodec/frwu.c
	libavcodec/g723_1.c
	libavcodec/gifdec.c
	libavcodec/idcinvideo.c
	libavcodec/iff.c
	libavcodec/indeo3.c
	libavcodec/internal.h
	libavcodec/interplayvideo.c
	libavcodec/kmvc.c
	libavcodec/mpc7.c
	libavcodec/mpegaudiodec.c
	libavcodec/pcx.c
	libavcodec/pngdec.c
	libavcodec/pnmdec.c
	libavcodec/rl2.c
	libavcodec/snow.c
	libavcodec/targa.c
	libavcodec/tscc.c
	libavcodec/txd.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/vb.c
	libavcodec/vmdav.c
	libavcodec/vp56.c
	libavcodec/vqavideo.c
	libavcodec/wavpack.c
	libavcodec/wnv1.c
	libavcodec/xl.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-12-05 15:18:12 +01:00
commit 874c5b02c4
168 changed files with 335 additions and 178 deletions

View File

@ -29,6 +29,7 @@
#include "bytestream.h"
#include "dsputil.h"
#include "get_bits.h"
#include "internal.h"
#include "libavutil/avassert.h"
@ -896,7 +897,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
} else if (frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")) {
if (!f->last_picture.data[0]) {
f->last_picture.reference = 3;
if (avctx->get_buffer(avctx, &f->last_picture) < 0) {
if (ff_get_buffer(avctx, &f->last_picture) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -38,6 +38,7 @@
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "internal.h"
static const enum AVPixelFormat pixfmt_rgb24[] = {
@ -82,7 +83,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
c->pic.reference = 0;
c->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
if (avctx->get_buffer(avctx, &c->pic) < 0){
if (ff_get_buffer(avctx, &c->pic) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -39,6 +39,7 @@
#include "libavutil/avassert.h"
#include "avcodec.h"
#include "internal.h"
#include "libavutil/common.h"
/** decoder context */
@ -135,7 +136,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
esc->frame.nb_samples = buf_size * 2;
if ((ret = avctx->get_buffer(avctx, &esc->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &esc->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -185,7 +185,7 @@ static int frame_configure_elements(AVCodecContext *avctx)
/* get output buffer */
ac->frame.nb_samples = 2048;
if ((ret = avctx->get_buffer(avctx, &ac->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &ac->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -1379,7 +1379,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
/* get output buffer */
avctx->channels = s->out_channels;
s->frame.nb_samples = s->num_blocks * 256;
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -23,6 +23,7 @@
#include "bytestream.h"
#include "adpcm.h"
#include "adpcm_data.h"
#include "internal.h"
/**
* @file
@ -639,7 +640,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
c->frame.nb_samples = nb_samples;
if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -23,6 +23,7 @@
#include "avcodec.h"
#include "adx.h"
#include "get_bits.h"
#include "internal.h"
/**
* @file
@ -143,7 +144,7 @@ static int adx_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
c->frame.nb_samples = num_blocks * BLOCK_SAMPLES;
if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -49,6 +49,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "bytestream.h"
#include "internal.h"
#include "unary.h"
#include "mathops.h"
@ -323,7 +324,7 @@ static int decode_element(AVCodecContext *avctx, void *data, int ch_index,
if (!alac->nb_samples) {
/* get output buffer */
alac->frame.nb_samples = output_samples;
if ((ret = avctx->get_buffer(avctx, &alac->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &alac->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -36,6 +36,7 @@
#include "bytestream.h"
#include "bgmc.h"
#include "dsputil.h"
#include "internal.h"
#include "libavutil/samplefmt.h"
#include "libavutil/crc.h"
@ -1462,7 +1463,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr,
/* get output buffer */
ctx->frame.nb_samples = ctx->cur_frame_length;
if ((ret = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &ctx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -55,6 +55,7 @@
#include "acelp_pitch_delay.h"
#include "lsp.h"
#include "amr.h"
#include "internal.h"
#include "amrnbdata.h"
@ -965,7 +966,7 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
p->avframe.nb_samples = AMR_BLOCK_SIZE;
if ((ret = avctx->get_buffer(avctx, &p->avframe)) < 0) {
if ((ret = ff_get_buffer(avctx, &p->avframe)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -36,6 +36,7 @@
#include "acelp_filters.h"
#include "acelp_vectors.h"
#include "acelp_pitch_delay.h"
#include "internal.h"
#define AMR_USE_16BIT_TABLES
#include "amr.h"
@ -1113,7 +1114,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
ctx->avframe.nb_samples = 4 * AMRWB_SFR_SIZE_16k;
if ((ret = avctx->get_buffer(avctx, &ctx->avframe)) < 0) {
if ((ret = ff_get_buffer(avctx, &ctx->avframe)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -29,6 +29,7 @@
#include "libavutil/xga_font_data.h"
#include "avcodec.h"
#include "cga_data.h"
#include "internal.h"
#define ATTR_BOLD 0x01 /**< Bold/Bright-foreground (mode 1) */
#define ATTR_FAINT 0x02 /**< Faint (mode 2) */
@ -242,7 +243,7 @@ static int execute_code(AVCodecContext * avctx, int c)
if (s->frame.data[0])
avctx->release_buffer(avctx, &s->frame);
avcodec_set_dimensions(avctx, width, height);
ret = avctx->get_buffer(avctx, &s->frame);
ret = ff_get_buffer(avctx, &s->frame);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;

View File

@ -26,6 +26,7 @@
#include "avcodec.h"
#include "dsputil.h"
#include "bytestream.h"
#include "internal.h"
/**
* @file
@ -906,7 +907,7 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = blockstodecode;
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -30,6 +30,7 @@
#include "avcodec.h"
#include "put_bits.h"
#include "dsputil.h"
#include "internal.h"
#include "mathops.h"
#include "mpeg12data.h"
@ -191,7 +192,7 @@ static int decode_frame(AVCodecContext *avctx,
avctx->release_buffer(avctx, p);
p->reference= 0;
if(avctx->get_buffer(avctx, p) < 0){
if(ff_get_buffer(avctx, p) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -36,6 +36,7 @@
#include "get_bits.h"
#include "dsputil.h"
#include "fft.h"
#include "internal.h"
#include "sinewin.h"
#include "atrac.h"
@ -286,7 +287,7 @@ static int atrac1_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
q->frame.nb_samples = AT1_SU_SAMPLES;
if ((ret = avctx->get_buffer(avctx, &q->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &q->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -43,6 +43,7 @@
#include "fft.h"
#include "fmtconvert.h"
#include "get_bits.h"
#include "internal.h"
#include "atrac.h"
#include "atrac3data.h"
@ -812,7 +813,7 @@ static int atrac3_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
q->frame.nb_samples = SAMPLES_PER_FRAME;
if ((ret = avctx->get_buffer(avctx, &q->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &q->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -24,6 +24,7 @@
*/
#include "avcodec.h"
#include "internal.h"
#include "libavutil/internal.h"
typedef struct AuraDecodeContext {
@ -73,7 +74,7 @@ static int aura_decode_frame(AVCodecContext *avctx,
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
s->frame.reference = 0;
if(avctx->get_buffer(avctx, &s->frame) < 0) {
if(ff_get_buffer(avctx, &s->frame) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -20,6 +20,7 @@
*/
#include "avcodec.h"
#include "internal.h"
#include "mjpeg.h"
#include "mjpegdec.h"
#include "libavutil/imgutils.h"
@ -99,7 +100,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
return AVERROR_INVALIDDATA;
}
if((ret = avctx->get_buffer(avctx, p)) < 0){
if((ret = ff_get_buffer(avctx, p)) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -21,6 +21,7 @@
*/
#include "avcodec.h"
#include "internal.h"
#include "libavutil/intreadwrite.h"
static av_cold int avui_decode_init(AVCodecContext *avctx)
@ -79,7 +80,7 @@ static int avui_decode_frame(AVCodecContext *avctx, void *data,
pic->reference = 0;
if (avctx->get_buffer(avctx, pic) < 0) {
if (ff_get_buffer(avctx, pic) < 0) {
av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n");
return AVERROR(ENOMEM);
}

View File

@ -29,6 +29,7 @@
#include "libavutil/common.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
typedef struct BFIContext {
AVCodecContext *avctx;
@ -63,7 +64,7 @@ static int bfi_decode_frame(AVCodecContext *avctx, void *data,
bfi->frame.reference = 3;
if (avctx->get_buffer(avctx, &bfi->frame) < 0) {
if (ff_get_buffer(avctx, &bfi->frame) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -25,6 +25,7 @@
#include "dsputil.h"
#include "binkdata.h"
#include "binkdsp.h"
#include "internal.h"
#include "mathops.h"
#define BITSTREAM_READER_LE
@ -1180,7 +1181,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
if(c->pic.data[0])
avctx->release_buffer(avctx, &c->pic);
if(avctx->get_buffer(avctx, &c->pic) < 0){
if(ff_get_buffer(avctx, &c->pic) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -36,6 +36,7 @@
#include "dct.h"
#include "rdft.h"
#include "fmtconvert.h"
#include "internal.h"
#include "libavutil/intfloat.h"
extern const uint16_t ff_wma_critical_freqs[25];
@ -321,7 +322,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = s->frame_len;
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -22,6 +22,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "bmp.h"
#include "internal.h"
#include "msrledec.h"
static av_cold int bmp_decode_init(AVCodecContext *avctx){
@ -208,7 +209,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
avctx->release_buffer(avctx, p);
p->reference = 0;
if(avctx->get_buffer(avctx, p) < 0){
if(ff_get_buffer(avctx, p) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -19,10 +19,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "bytestream.h"
#include "libavutil/avassert.h"
#include "internal.h"
enum BMVFlags{
BMV_NOP = 0,
@ -244,7 +245,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
avctx->release_buffer(avctx, &c->pic);
c->pic.reference = 3;
if ((ret = avctx->get_buffer(avctx, &c->pic)) < 0) {
if ((ret = ff_get_buffer(avctx, &c->pic)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
@ -342,7 +343,7 @@ static int bmv_aud_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
c->frame.nb_samples = total_blocks * 32;
if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -28,6 +28,7 @@
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
typedef struct BRPixContext {
AVFrame frame;
@ -151,7 +152,7 @@ static int brpix_decode_frame(AVCodecContext *avctx,
if (hdr.width != avctx->width || hdr.height != avctx->height)
avcodec_set_dimensions(avctx, hdr.width, hdr.height);
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -30,6 +30,7 @@
#include "get_bits.h"
#include "golomb.h"
#include "cavs.h"
#include "internal.h"
static const uint8_t mv_scan[4] = {
MV_FWD_X0,MV_FWD_X1,
@ -962,7 +963,7 @@ static int decode_pic(AVSContext *h) {
if(h->picture.f.data[0])
s->avctx->release_buffer(s->avctx, &h->picture.f);
s->avctx->get_buffer(s->avctx, &h->picture.f);
ff_get_buffer(s->avctx, &h->picture.f);
ff_cavs_init_pic(h);
h->picture.poc = get_bits(&s->gb,8)*2;

View File

@ -21,6 +21,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
/**
* @file
@ -337,7 +338,7 @@ static int cdg_decode_frame(AVCodecContext *avctx,
}
cdg_init_frame(&new_frame);
ret = avctx->get_buffer(avctx, &new_frame);
ret = ff_get_buffer(avctx, &new_frame);
if (ret) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;

View File

@ -25,6 +25,7 @@
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#define BIT_PLANAR 0x00
#define CHUNKY 0x20
@ -264,7 +265,7 @@ static int cdxl_decode_frame(AVCodecContext *avctx, void *data,
avctx->release_buffer(avctx, p);
p->reference = 0;
if ((ret = avctx->get_buffer(avctx, p)) < 0) {
if ((ret = ff_get_buffer(avctx, p)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -74,7 +74,7 @@ static int decode_frame(AVCodecContext *avctx,
}
p->reference = 0;
if ((ret = avctx->get_buffer(avctx, p)) < 0) {
if ((ret = ff_get_buffer(avctx, p)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -24,6 +24,7 @@
#include "dsputil.h"
#include "get_bits.h"
#include "avcodec.h"
#include "internal.h"
typedef struct CLLCContext {
DSPContext dsp;
@ -333,7 +334,7 @@ static int cllc_decode_frame(AVCodecContext *avctx, void *data,
avctx->pix_fmt = AV_PIX_FMT_RGB24;
avctx->bits_per_raw_sample = 8;
ret = avctx->get_buffer(avctx, pic);
ret = ff_get_buffer(avctx, pic);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n");
return ret;
@ -348,7 +349,7 @@ static int cllc_decode_frame(AVCodecContext *avctx, void *data,
avctx->pix_fmt = AV_PIX_FMT_ARGB;
avctx->bits_per_raw_sample = 8;
ret = avctx->get_buffer(avctx, pic);
ret = ff_get_buffer(avctx, pic);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n");
return ret;

View File

@ -24,6 +24,7 @@
#include "libavutil/common.h"
#include "avcodec.h"
#include "celp_filters.h"
#include "internal.h"
#include "libavutil/lfg.h"
typedef struct CNGContext {
@ -144,7 +145,7 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data,
p->excitation, avctx->frame_size, p->order);
p->avframe.nb_samples = avctx->frame_size;
if ((ret = avctx->get_buffer(avctx, &p->avframe)) < 0) {
if ((ret = ff_get_buffer(avctx, &p->avframe)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -49,6 +49,7 @@
#include "dsputil.h"
#include "bytestream.h"
#include "fft.h"
#include "internal.h"
#include "sinewin.h"
#include "cookdata.h"
@ -969,7 +970,7 @@ static int cook_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
if (q->discarded_packets >= 2) {
q->frame.nb_samples = q->samples_per_channel;
if ((ret = avctx->get_buffer(avctx, &q->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &q->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -85,6 +85,7 @@
#include "avcodec.h"
#include "h264.h"
#include "internal.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
@ -642,7 +643,7 @@ static inline CopyRet copy_frame(AVCodecContext *avctx,
priv->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE |
FF_BUFFER_HINTS_REUSABLE;
if (!priv->pic.data[0]) {
if (avctx->get_buffer(avctx, &priv->pic) < 0) {
if (ff_get_buffer(avctx, &priv->pic) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return RET_ERROR;
}

View File

@ -22,6 +22,7 @@
#include <stdlib.h>
#include "avcodec.h"
#include "internal.h"
#include "libavutil/common.h"
#if CONFIG_ZLIB

View File

@ -34,6 +34,7 @@
#include "avcodec.h"
#include "dsputil.h"
#include "internal.h"
#include "libavutil/internal.h"
@ -110,7 +111,7 @@ static int cyuv_decode_frame(AVCodecContext *avctx,
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
s->frame.reference = 0;
if (avctx->get_buffer(avctx, &s->frame) < 0) {
if (ff_get_buffer(avctx, &s->frame) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -45,6 +45,7 @@
#include "synth_filter.h"
#include "dcadsp.h"
#include "fmtconvert.h"
#include "internal.h"
#if ARCH_ARM
# include "arm/dca.h"
@ -2352,7 +2353,7 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = 256 * (s->sample_blocks / 8);
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -23,6 +23,7 @@
#include "libavutil/avassert.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
@ -327,7 +328,7 @@ static int dfa_decode_frame(AVCodecContext *avctx,
if (s->pic.data[0])
avctx->release_buffer(avctx, &s->pic);
if ((ret = avctx->get_buffer(avctx, &s->pic))) {
if ((ret = ff_get_buffer(avctx, &s->pic))) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -30,6 +30,7 @@
#include "dsputil.h"
#include "get_bits.h"
#include "bytestream.h"
#include "internal.h"
#include "golomb.h"
#include "dirac_arith.h"
#include "mpeg12data.h"
@ -1668,7 +1669,7 @@ static int dirac_decode_picture_header(DiracContext *s)
for (j = 0; j < MAX_FRAMES; j++)
if (!s->all_frames[j].avframe.data[0]) {
s->ref_pics[i] = &s->all_frames[j];
s->avctx->get_buffer(s->avctx, &s->ref_pics[i]->avframe);
ff_get_buffer(s->avctx, &s->ref_pics[i]->avframe);
break;
}
}
@ -1806,7 +1807,7 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int
pic->avframe.key_frame = s->num_refs == 0; /* [DIRAC_STD] is_intra() */
pic->avframe.pict_type = s->num_refs + 1; /* Definition of AVPictureType in avutil.h */
if (avctx->get_buffer(avctx, &pic->avframe) < 0) {
if (ff_get_buffer(avctx, &pic->avframe) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -30,6 +30,7 @@
#include "get_bits.h"
#include "dnxhddata.h"
#include "dsputil.h"
#include "internal.h"
#include "thread.h"
typedef struct DNXHDContext {

View File

@ -40,6 +40,7 @@
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "mathops.h"
typedef struct DPCMContext {
@ -213,7 +214,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = (out + avctx->channels - 1) / avctx->channels;
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -23,6 +23,7 @@
#include "libavutil/imgutils.h"
#include "bytestream.h"
#include "avcodec.h"
#include "internal.h"
typedef struct DPXContext {
AVFrame picture;
@ -187,7 +188,7 @@ static int decode_frame(AVCodecContext *avctx,
if (s->picture.data[0])
avctx->release_buffer(avctx, &s->picture);
if (avctx->get_buffer(avctx, p) < 0) {
if (ff_get_buffer(avctx, p) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -27,6 +27,7 @@
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "mathops.h"
@ -365,7 +366,7 @@ static int cinaudio_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
cin->frame.nb_samples = avpkt->size - cin->initial_decode_frame;
if ((ret = avctx->get_buffer(avctx, &cin->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &cin->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -39,6 +39,7 @@
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "dsputil.h"
#include "internal.h"
#include "get_bits.h"
#include "put_bits.h"
#include "simple_idct.h"
@ -336,7 +337,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
avctx->pix_fmt = s->sys->pix_fmt;
avctx->time_base = s->sys->time_base;
avcodec_set_dimensions(avctx, s->sys->width, s->sys->height);
if (avctx->get_buffer(avctx, &s->picture) < 0) {
if (ff_get_buffer(avctx, &s->picture) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -30,6 +30,7 @@
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "internal.h"
#include <zlib.h>
@ -215,7 +216,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
buf_size -= 768+4;
}
if(avctx->get_buffer(avctx, &c->pic) < 0){
if(ff_get_buffer(avctx, &c->pic) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -21,6 +21,7 @@
*/
#include "avcodec.h"
#include "internal.h"
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
@ -52,7 +53,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
pic->reference = 0;
if ((ret = avctx->get_buffer(avctx, pic)) < 0)
if ((ret = ff_get_buffer(avctx, pic)) < 0)
return ret;
pic->pict_type = AV_PICTURE_TYPE_I;

View File

@ -32,6 +32,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "internal.h"
typedef struct CmvContext {
AVCodecContext *avctx;
@ -183,7 +184,7 @@ static int cmv_decode_frame(AVCodecContext *avctx,
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID |
FF_BUFFER_HINTS_READABLE |
FF_BUFFER_HINTS_PRESERVE;
if (avctx->get_buffer(avctx, &s->frame)<0) {
if (ff_get_buffer(avctx, &s->frame)<0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -33,6 +33,7 @@
#include "dsputil.h"
#include "aandcttab.h"
#include "eaidct.h"
#include "internal.h"
#include "mpeg12.h"
#include "mpeg12data.h"
#include "libavutil/imgutils.h"
@ -269,7 +270,7 @@ static int decode_frame(AVCodecContext *avctx,
s->frame.reference = 3;
if (!s->frame.data[0]) {
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -35,6 +35,7 @@
#include "dsputil.h"
#include "aandcttab.h"
#include "eaidct.h"
#include "internal.h"
typedef struct TgqContext {
AVCodecContext *avctx;
@ -222,7 +223,7 @@ static int tgq_decode_frame(AVCodecContext *avctx,
s->frame.key_frame = 1;
s->frame.pict_type = AV_PICTURE_TYPE_I;
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
if (avctx->get_buffer(avctx, &s->frame)) {
if (ff_get_buffer(avctx, &s->frame)) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -31,6 +31,7 @@
#include "dsputil.h"
#include "aandcttab.h"
#include "eaidct.h"
#include "internal.h"
#include "mpeg12.h"
#include "mpegvideo.h"
@ -116,7 +117,7 @@ static int tqi_decode_frame(AVCodecContext *avctx,
if (s->avctx->width!=s->width || s->avctx->height!=s->height)
avcodec_set_dimensions(s->avctx, s->width, s->height);
if(avctx->get_buffer(avctx, &t->frame) < 0) {
if(ff_get_buffer(avctx, &t->frame) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -20,6 +20,7 @@
*/
#include "avcodec.h"
#include "internal.h"
#define BITSTREAM_READER_LE
#include "get_bits.h"
@ -268,7 +269,7 @@ static int escape124_decode_frame(AVCodecContext *avctx,
}
new_frame.reference = 3;
if (avctx->get_buffer(avctx, &new_frame)) {
if (ff_get_buffer(avctx, &new_frame)) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -23,6 +23,8 @@
#define BITSTREAM_READER_LE
#include "get_bits.h"
#include "internal.h"
typedef struct Escape130Context {
AVFrame frame;
@ -129,7 +131,7 @@ static int escape130_decode_frame(AVCodecContext *avctx,
skip_bits_long(&gb, 128);
new_frame.reference = 3;
if (avctx->get_buffer(avctx, &new_frame)) {
if (ff_get_buffer(avctx, &new_frame)) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -764,7 +764,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
}
p->reference = 3; //for error concealment
if ((ret = avctx->get_buffer(avctx, p)) < 0) {
if ((ret = ff_get_buffer(avctx, p)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -22,6 +22,8 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "avcodec.h"
#include "internal.h"
#define SIN_BITS 14
#define WS_MAX_CHANNELS 32
@ -442,7 +444,7 @@ static int wavesynth_decode(AVCodecContext *avc, void *rframe, int *rgot_frame,
if (duration <= 0)
return AVERROR(EINVAL);
ws->frame.nb_samples = duration;
r = avc->get_buffer(avc, &ws->frame);
r = ff_get_buffer(avc, &ws->frame);
if (r < 0)
return r;
pcm = (int16_t *)ws->frame.data[0];

View File

@ -529,7 +529,7 @@ static int flac_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = s->blocksize;
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -226,7 +226,7 @@ int ff_thread_video_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVF
if(!new)
return AVERROR(ENOMEM);
pthread_mutex_lock(&c->buffer_mutex);
ret = c->parent_avctx->get_buffer(c->parent_avctx, new);
ret = ff_get_buffer(c->parent_avctx, new);
pthread_mutex_unlock(&c->buffer_mutex);
if(ret<0)
return ret;

View File

@ -22,6 +22,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "libavutil/opt.h"
typedef struct {
@ -66,7 +67,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
pic->reference = 0;
if ((ret = avctx->get_buffer(avctx, pic)) < 0) {
if ((ret = ff_get_buffer(avctx, pic)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -39,6 +39,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "g722.h"
#include "internal.h"
#define OFFSET(x) offsetof(G722Context, x)
#define AD AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM
@ -95,7 +96,7 @@ static int g722_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
c->frame.nb_samples = avpkt->size * 2;
if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -36,6 +36,7 @@
#include "celp_filters.h"
#include "celp_math.h"
#include "g723_1_data.h"
#include "internal.h"
#define CNG_RANDOM_SEED 12345
@ -1187,7 +1188,7 @@ static int g723_1_decode_frame(AVCodecContext *avctx, void *data,
}
p->frame.nb_samples = FRAME_LEN;
if ((ret = avctx->get_buffer(avctx, &p->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &p->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -452,7 +452,7 @@ static int g726_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
c->frame.nb_samples = out_samples;
if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -26,6 +26,8 @@
#include "libavutil/avutil.h"
#include "get_bits.h"
#include "dsputil.h"
#include "internal.h"
#include "g729.h"
#include "lsp.h"
@ -418,7 +420,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr,
int is_periodic = 0; // whether one of the subframes is declared as periodic or not
ctx->frame.nb_samples = SUBFRAME_SIZE<<1;
if ((ret = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &ctx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -27,6 +27,7 @@
#include "libavutil/opt.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "lzw.h"
#include "gif.h"
@ -487,7 +488,7 @@ static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_picture,
if (s->picture.data[0])
avctx->release_buffer(avctx, &s->picture);
if ((ret = avctx->get_buffer(avctx, &s->picture)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->picture)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -27,6 +27,7 @@
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#include "msgsmdec.h"
#include "gsmdec_template.c"
@ -74,7 +75,7 @@ static int gsm_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = avctx->frame_size;
if ((res = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((res = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return res;
}

View File

@ -49,6 +49,7 @@
#include <string.h>
#include "avcodec.h"
#include "internal.h"
#include "libavutil/internal.h"
#define HUFFMAN_TABLE_SIZE 64 * 1024
@ -227,7 +228,7 @@ static int idcin_decode_frame(AVCodecContext *avctx,
if (s->frame.data[0])
avctx->release_buffer(avctx, &s->frame);
if ((ret = avctx->get_buffer(avctx, &s->frame))) {
if ((ret = ff_get_buffer(avctx, &s->frame))) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -29,6 +29,7 @@
#include "bytestream.h"
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
// TODO: masking bits
typedef enum {
@ -606,7 +607,7 @@ static int decode_frame(AVCodecContext *avctx,
av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
return res;
}
} else if ((res = avctx->get_buffer(avctx, &s->frame)) < 0) {
} else if ((res = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return res;
} else if (avctx->bits_per_coded_sample <= 8 && avctx->pix_fmt == AV_PIX_FMT_PAL8) {

View File

@ -41,6 +41,7 @@
#include "get_bits.h"
#include "dsputil.h"
#include "fft.h"
#include "internal.h"
#include "sinewin.h"
#include "imcdata.h"
@ -947,7 +948,7 @@ static int imc_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
q->frame.nb_samples = COEFFS;
if ((ret = avctx->get_buffer(avctx, &q->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &q->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -35,6 +35,7 @@
#include "dsputil.h"
#include "bytestream.h"
#include "get_bits.h"
#include "internal.h"
#include "indeo3data.h"
@ -1088,7 +1089,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
avctx->release_buffer(avctx, &ctx->frame);
ctx->frame.reference = 0;
if ((res = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
if ((res = ff_get_buffer(avctx, &ctx->frame)) < 0) {
av_log(ctx->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return res;
}

View File

@ -169,6 +169,13 @@ static av_always_inline int64_t ff_samples_to_time_base(AVCodecContext *avctx,
avctx->time_base);
}
/**
* Get a buffer for a frame. This is a wrapper around
* AVCodecContext.get_buffer() and should be used instead calling get_buffer()
* directly.
*/
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame);
int ff_thread_can_start_frame(AVCodecContext *avctx);
int ff_get_logical_cpus(AVCodecContext *avctx);

View File

@ -43,6 +43,7 @@
#include "dsputil.h"
#define BITSTREAM_READER_LE
#include "get_bits.h"
#include "internal.h"
#define PALETTE_COUNT 256
@ -976,7 +977,7 @@ static int ipvideo_decode_frame(AVCodecContext *avctx,
buf_size - s->decoding_map_size);
s->current_frame.reference = 3;
if (avctx->get_buffer(avctx, &s->current_frame)) {
if (ff_get_buffer(avctx, &s->current_frame)) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -30,6 +30,7 @@
#include "libavutil/attributes.h"
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#include "mathops.h"
#include "ivi_common.h"
#include "ivi_dsp.h"
@ -844,7 +845,7 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
ctx->frame.reference = 0;
avcodec_set_dimensions(avctx, ctx->planes[0].width, ctx->planes[0].height);
if ((result = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
if ((result = ff_get_buffer(avctx, &ctx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return result;
}

View File

@ -29,6 +29,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "j2k.h"
#include "libavutil/common.h"
@ -283,7 +284,7 @@ static int get_siz(J2kDecoderContext *s)
if (s->picture.data[0])
s->avctx->release_buffer(s->avctx, &s->picture);
if ((ret = s->avctx->get_buffer(s->avctx, &s->picture)) < 0)
if ((ret = ff_get_buffer(s->avctx, &s->picture)) < 0)
return ret;
s->picture.pict_type = AV_PICTURE_TYPE_I;

View File

@ -28,6 +28,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "internal.h"
typedef struct {
AVCodecContext *avctx;
@ -71,7 +72,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
maxcnt = w * h;
c->cur.reference = 3;
if ((res = avctx->get_buffer(avctx, &c->cur)) < 0)
if ((res = ff_get_buffer(avctx, &c->cur)) < 0)
return res;
out = (uint16_t *) c->cur.data[0];
if (c->prev.data[0]) {

View File

@ -29,6 +29,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#define KMVC_KEYFRAME 0x80
#define KMVC_PALETTE 0x40
@ -274,7 +275,7 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPa
ctx->pic.reference = 3;
ctx->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
if ((ret = avctx->get_buffer(avctx, &ctx->pic)) < 0) {
if ((ret = ff_get_buffer(avctx, &ctx->pic)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -44,6 +44,7 @@
#include "libavutil/mem.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "lcl.h"
#if CONFIG_ZLIB_DECODER
@ -186,7 +187,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
c->pic.reference = 0;
c->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
if(avctx->get_buffer(avctx, &c->pic) < 0){
if(ff_get_buffer(avctx, &c->pic) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -112,7 +112,7 @@ static int libcelt_dec_decode(AVCodecContext *c, void *frame,
int16_t *pcm;
celt->frame.nb_samples = c->frame_size;
err = c->get_buffer(c, &celt->frame);
err = ff_get_buffer(c, &celt->frame);
if (err < 0) {
av_log(c, AV_LOG_ERROR, "get_buffer() failed\n");
return err;

View File

@ -205,7 +205,7 @@ static int libgsm_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = avctx->frame_size;
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -95,7 +95,7 @@ static int ilbc_decode_frame(AVCodecContext *avctx, void *data,
}
s->frame.nb_samples = s->decoder.blockl;
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -150,7 +150,7 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = 160;
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
@ -346,7 +346,7 @@ static int amr_wb_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = 320;
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -133,7 +133,7 @@ static int libopus_decode(AVCodecContext *avc, void *frame,
int ret, nb_samples;
opus->frame.nb_samples = MAX_FRAME_SIZE;
ret = avc->get_buffer(avc, &opus->frame);
ret = ff_get_buffer(avc, &opus->frame);
if (ret < 0) {
av_log(avc, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;

View File

@ -34,6 +34,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "internal.h"
#include "libschroedinger.h"
#include <schroedinger/schro.h>
@ -309,7 +310,7 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext,
if (framewithpts && framewithpts->frame) {
if (p_schro_params->dec_frame.data[0])
avccontext->release_buffer(avccontext, &p_schro_params->dec_frame);
if (avccontext->get_buffer(avccontext, &p_schro_params->dec_frame) < 0) {
if (ff_get_buffer(avccontext, &p_schro_params->dec_frame) < 0) {
av_log(avccontext, AV_LOG_ERROR, "Unable to allocate buffer\n");
return AVERROR(ENOMEM);
}

View File

@ -26,6 +26,7 @@
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "avcodec.h"
#include "internal.h"
typedef struct {
AVFrame frame;
@ -120,7 +121,7 @@ static int libspeex_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = s->frame_size;
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -185,7 +185,7 @@ void* decode_thread(void *arg)
buffer->release();
goto push_frame;
}
ret = avctx->get_buffer(avctx, frame->vframe);
ret = ff_get_buffer(avctx, frame->vframe);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
frame->status = ret;

View File

@ -22,6 +22,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
typedef struct OggVorbisDecContext {
AVFrame frame;
@ -141,7 +142,7 @@ static int oggvorbis_decode_frame(AVCodecContext *avccontext, void *data,
}
context->frame.nb_samples = 8192*4;
if ((ret = avccontext->get_buffer(avccontext, &context->frame)) < 0) {
if ((ret = ff_get_buffer(avccontext, &context->frame)) < 0) {
av_log(avccontext, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -27,6 +27,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
#include "internal.h"
#include "mathops.h"
enum LOCO_MODE {LOCO_UNKN=0, LOCO_CYUY2=-1, LOCO_CRGB=-2, LOCO_CRGBA=-3, LOCO_CYV12=-4,
@ -173,7 +174,7 @@ static int decode_frame(AVCodecContext *avctx,
avctx->release_buffer(avctx, p);
p->reference = 0;
if(avctx->get_buffer(avctx, p) < 0){
if(ff_get_buffer(avctx, p) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -25,6 +25,7 @@
*/
#include "avcodec.h"
#include "internal.h"
#include "libavutil/common.h"
/*
@ -250,7 +251,7 @@ static int mace_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
ctx->frame.nb_samples = 3 * (buf_size << (1 - is_mace3)) / avctx->channels;
if ((ret = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &ctx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -35,6 +35,7 @@
#include "libavutil/opt.h"
#include "avcodec.h"
#include "dsputil.h"
#include "internal.h"
#include "mjpeg.h"
#include "mjpegdec.h"
#include "jpeglsdec.h"
@ -435,7 +436,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
if (s->picture_ptr->data[0])
s->avctx->release_buffer(s->avctx, s->picture_ptr);
if (s->avctx->get_buffer(s->avctx, s->picture_ptr) < 0) {
if (ff_get_buffer(s->avctx, s->picture_ptr) < 0) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -29,6 +29,7 @@
#include "avcodec.h"
#include "libavutil/intreadwrite.h"
#include "get_bits.h"
#include "internal.h"
#include "libavutil/crc.h"
#include "parser.h"
#include "mlp_parser.h"
@ -981,7 +982,7 @@ static int output_data(MLPDecodeContext *m, unsigned int substr,
/* get output buffer */
m->frame.nb_samples = s->blockpos;
if ((ret = avctx->get_buffer(avctx, &m->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &m->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -30,6 +30,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
#include "internal.h"
#include "mpegaudiodsp.h"
#include "mpc.h"
@ -225,7 +226,7 @@ static int mpc7_decode_frame(AVCodecContext * avctx, void *data,
/* get output buffer */
c->frame.nb_samples = MPC_FRAME_SIZE;
if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -30,6 +30,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
#include "internal.h"
#include "mpegaudiodsp.h"
#include "mpc.h"
@ -255,7 +256,7 @@ static int mpc8_decode_frame(AVCodecContext * avctx, void *data,
/* get output buffer */
c->frame.nb_samples = MPC_FRAME_SIZE;
if ((res = avctx->get_buffer(avctx, &c->frame)) < 0) {
if ((res = ff_get_buffer(avctx, &c->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return res;
}

View File

@ -29,6 +29,7 @@
#include "libavutil/libm.h"
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#include "mathops.h"
#include "mpegaudiodsp.h"
#include "dsputil.h"
@ -1629,7 +1630,7 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT **samples,
/* get output buffer */
if (!samples) {
s->frame.nb_samples = s->avctx->frame_size;
if ((ret = s->avctx->get_buffer(s->avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(s->avctx, &s->frame)) < 0) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
@ -1934,7 +1935,7 @@ static int decode_frame_mp3on4(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame->nb_samples = s->frames * MPA_FRAME_SIZE;
if ((ret = avctx->get_buffer(avctx, s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -24,6 +24,7 @@
*/
#include "libavutil/avassert.h"
#include "internal.h"
#include "msmpeg4data.h"
#include "vc1.h"
#include "mss12.h"
@ -605,7 +606,7 @@ static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
FF_BUFFER_HINTS_PRESERVE |
FF_BUFFER_HINTS_REUSABLE;
if ((ret = avctx->get_buffer(avctx, &ctx->pic)) < 0) {
if ((ret = ff_get_buffer(avctx, &ctx->pic)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -25,6 +25,7 @@
* MxPEG decoder
*/
#include "internal.h"
#include "mjpeg.h"
#include "mjpegdec.h"
@ -250,7 +251,7 @@ static int mxpeg_decode_frame(AVCodecContext *avctx,
/* use stored SOF data to allocate current picture */
if (jpg->picture_ptr->data[0])
avctx->release_buffer(avctx, jpg->picture_ptr);
if (avctx->get_buffer(avctx, jpg->picture_ptr) < 0) {
if (ff_get_buffer(avctx, jpg->picture_ptr) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return AVERROR(ENOMEM);
}
@ -269,7 +270,7 @@ static int mxpeg_decode_frame(AVCodecContext *avctx,
/* allocate dummy reference picture if needed */
if (!reference_ptr->data[0] &&
avctx->get_buffer(avctx, reference_ptr) < 0) {
ff_get_buffer(avctx, reference_ptr) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return AVERROR(ENOMEM);
}

View File

@ -38,6 +38,7 @@
#include "dsputil.h"
#include "fft.h"
#include "fmtconvert.h"
#include "internal.h"
#include "nellymoser.h"
#include "sinewin.h"
@ -171,7 +172,7 @@ static int decode_tag(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = NELLY_SAMPLES * blocks;
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -24,6 +24,8 @@
#include "libavcodec/paf.h"
#include "bytestream.h"
#include "avcodec.h"
#include "internal.h"
static const uint8_t block_sequences[16][8] =
{
@ -410,7 +412,7 @@ static int paf_aud_decode(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
c->frame.nb_samples = PAF_SOUND_SAMPLES * frames;
if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0)
if ((ret = ff_get_buffer(avctx, &c->frame)) < 0)
return ret;
output_samples = (int16_t *)c->frame.data[0];

View File

@ -27,6 +27,7 @@
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
/*
* Channel Mapping according to
@ -166,7 +167,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = samples;
if ((retval = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((retval = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return retval;
}

View File

@ -359,7 +359,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = n * samples_per_block / avctx->channels;
if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -26,6 +26,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "get_bits.h"
#include "internal.h"
typedef struct PCXContext {
AVFrame picture;
@ -150,7 +151,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
return AVERROR_INVALIDDATA;
if (w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
if ((ret = avctx->get_buffer(avctx, p)) < 0) {
if ((ret = ff_get_buffer(avctx, p)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -28,6 +28,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "cga_data.h"
#include "internal.h"
typedef struct PicContext {
AVFrame frame;
@ -154,7 +155,7 @@ static int decode_frame(AVCodecContext *avctx,
avctx->release_buffer(avctx, &s->frame);
}
if (avctx->get_buffer(avctx, &s->frame) < 0){
if (ff_get_buffer(avctx, &s->frame) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}

View File

@ -25,6 +25,7 @@
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "png.h"
#include "pngdsp.h"
@ -648,7 +649,7 @@ static int decode_frame(AVCodecContext *avctx,
avctx->release_buffer(avctx, p);
p->reference= 3;
if(avctx->get_buffer(avctx, p) < 0){
if(ff_get_buffer(avctx, p) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
goto fail;
}

View File

@ -20,6 +20,7 @@
*/
#include "avcodec.h"
#include "internal.h"
#include "put_bits.h"
#include "pnm.h"
@ -47,7 +48,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
avctx->release_buffer(avctx, p);
p->reference = 0;
if ((ret = avctx->get_buffer(avctx, p)) < 0) {
if ((ret = ff_get_buffer(avctx, p)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}

View File

@ -30,6 +30,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#include "simple_idct.h"
#include "proresdec.h"
@ -550,7 +551,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if (frame->data[0])
avctx->release_buffer(avctx, frame);
if (avctx->get_buffer(avctx, frame) < 0)
if (ff_get_buffer(avctx, frame) < 0)
return -1;
decode_picture:

Some files were not shown because too many files have changed in this diff Show More