summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-11-10 13:22:56 +0100
committerAnton Khirnov <anton@khirnov.net>2012-12-04 21:41:59 +0100
commit594d4d5df3c70404168701dd5c90b7e6e5587793 (patch)
treebfed1b2d0f2a7cd1a3c1b147c5e33995642c9183 /libavcodec
parentcb45553f577f8e0ebfe05d3287e1b6fa5859b967 (diff)
lavc: add a wrapper for AVCodecContext.get_buffer().
It will be useful in the upcoming transition to refcounted AVFrames.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/4xm.c5
-rw-r--r--libavcodec/8bps.c3
-rw-r--r--libavcodec/8svx.c3
-rw-r--r--libavcodec/aacdec.c2
-rw-r--r--libavcodec/ac3dec.c2
-rw-r--r--libavcodec/adpcm.c3
-rw-r--r--libavcodec/adxdec.c3
-rw-r--r--libavcodec/alac.c3
-rw-r--r--libavcodec/alsdec.c3
-rw-r--r--libavcodec/amrnbdec.c3
-rw-r--r--libavcodec/amrwbdec.c3
-rw-r--r--libavcodec/ansi.c3
-rw-r--r--libavcodec/apedec.c3
-rw-r--r--libavcodec/asvdec.c3
-rw-r--r--libavcodec/atrac1.c3
-rw-r--r--libavcodec/atrac3.c3
-rw-r--r--libavcodec/aura.c3
-rw-r--r--libavcodec/bfi.c3
-rw-r--r--libavcodec/bink.c3
-rw-r--r--libavcodec/binkaudio.c3
-rw-r--r--libavcodec/bmp.c3
-rw-r--r--libavcodec/bmv.c5
-rw-r--r--libavcodec/cavsdec.c3
-rw-r--r--libavcodec/cdgraphics.c3
-rw-r--r--libavcodec/cdxl.c3
-rw-r--r--libavcodec/cljr.c2
-rw-r--r--libavcodec/cllc.c5
-rw-r--r--libavcodec/cngdec.c3
-rw-r--r--libavcodec/cook.c3
-rw-r--r--libavcodec/cscd.c3
-rw-r--r--libavcodec/cyuv.c3
-rw-r--r--libavcodec/dcadec.c3
-rw-r--r--libavcodec/dfa.c3
-rw-r--r--libavcodec/dnxhddec.c3
-rw-r--r--libavcodec/dpcm.c3
-rw-r--r--libavcodec/dpx.c3
-rw-r--r--libavcodec/dsicinav.c3
-rw-r--r--libavcodec/dvdec.c3
-rw-r--r--libavcodec/dxa.c3
-rw-r--r--libavcodec/dxtory.c3
-rw-r--r--libavcodec/eacmv.c3
-rw-r--r--libavcodec/eamad.c3
-rw-r--r--libavcodec/eatgq.c3
-rw-r--r--libavcodec/eatqi.c3
-rw-r--r--libavcodec/escape124.c3
-rw-r--r--libavcodec/ffv1dec.c3
-rw-r--r--libavcodec/flacdec.c2
-rw-r--r--libavcodec/frwu.c3
-rw-r--r--libavcodec/g722dec.c3
-rw-r--r--libavcodec/g723_1.c3
-rw-r--r--libavcodec/g726.c2
-rw-r--r--libavcodec/gifdec.c3
-rw-r--r--libavcodec/gsmdec.c3
-rw-r--r--libavcodec/idcinvideo.c3
-rw-r--r--libavcodec/iff.c5
-rw-r--r--libavcodec/imc.c3
-rw-r--r--libavcodec/indeo3.c3
-rw-r--r--libavcodec/internal.h7
-rw-r--r--libavcodec/interplayvideo.c3
-rw-r--r--libavcodec/ivi_common.c3
-rw-r--r--libavcodec/kgv1dec.c3
-rw-r--r--libavcodec/kmvc.c3
-rw-r--r--libavcodec/lcldec.c3
-rw-r--r--libavcodec/libgsm.c2
-rw-r--r--libavcodec/libilbc.c2
-rw-r--r--libavcodec/libopencore-amr.c4
-rw-r--r--libavcodec/libopusdec.c3
-rw-r--r--libavcodec/libschroedingerdec.c3
-rw-r--r--libavcodec/libspeexdec.c3
-rw-r--r--libavcodec/loco.c3
-rw-r--r--libavcodec/mace.c3
-rw-r--r--libavcodec/mjpegdec.c3
-rw-r--r--libavcodec/mlpdec.c3
-rw-r--r--libavcodec/mpc7.c3
-rw-r--r--libavcodec/mpc8.c3
-rw-r--r--libavcodec/mpegaudiodec.c5
-rw-r--r--libavcodec/mss2.c3
-rw-r--r--libavcodec/mxpegdec.c5
-rw-r--r--libavcodec/nellymoserdec.c3
-rw-r--r--libavcodec/pcm-mpeg.c3
-rw-r--r--libavcodec/pcm.c2
-rw-r--r--libavcodec/pcx.c3
-rw-r--r--libavcodec/pictordec.c3
-rw-r--r--libavcodec/pngdec.c3
-rw-r--r--libavcodec/pnmdec.c3
-rw-r--r--libavcodec/proresdec.c3
-rw-r--r--libavcodec/pthread.c6
-rw-r--r--libavcodec/ptx.c3
-rw-r--r--libavcodec/qcelpdec.c2
-rw-r--r--libavcodec/qdm2.c3
-rw-r--r--libavcodec/qdrw.c3
-rw-r--r--libavcodec/r210dec.c3
-rw-r--r--libavcodec/ra144dec.c3
-rw-r--r--libavcodec/ra288.c3
-rw-r--r--libavcodec/ralf.c3
-rw-r--r--libavcodec/rl2.c3
-rw-r--r--libavcodec/roqvideoenc.c4
-rw-r--r--libavcodec/s302m.c3
-rw-r--r--libavcodec/sgidec.c3
-rw-r--r--libavcodec/shorten.c3
-rw-r--r--libavcodec/sipr.c3
-rw-r--r--libavcodec/smacker.c3
-rw-r--r--libavcodec/snow.c4
-rw-r--r--libavcodec/snowdec.c1
-rw-r--r--libavcodec/snowenc.c2
-rw-r--r--libavcodec/sunrast.c3
-rw-r--r--libavcodec/svq1enc.c4
-rw-r--r--libavcodec/targa.c3
-rw-r--r--libavcodec/thread.h2
-rw-r--r--libavcodec/tiff.c3
-rw-r--r--libavcodec/tmv.c3
-rw-r--r--libavcodec/truespeech.c3
-rw-r--r--libavcodec/tscc.c3
-rw-r--r--libavcodec/tta.c3
-rw-r--r--libavcodec/twinvq.c3
-rw-r--r--libavcodec/txd.c3
-rw-r--r--libavcodec/utils.c11
-rw-r--r--libavcodec/v210dec.c3
-rw-r--r--libavcodec/v210x.c3
-rw-r--r--libavcodec/v410dec.c3
-rw-r--r--libavcodec/vb.c3
-rw-r--r--libavcodec/vble.c3
-rw-r--r--libavcodec/vc1dec.c2
-rw-r--r--libavcodec/vcr1.c3
-rw-r--r--libavcodec/vmdav.c5
-rw-r--r--libavcodec/vorbisdec.c3
-rw-r--r--libavcodec/vp56.c3
-rw-r--r--libavcodec/vqavideo.c3
-rw-r--r--libavcodec/wavpack.c3
-rw-r--r--libavcodec/wmadec.c3
-rw-r--r--libavcodec/wmalosslessdec.c2
-rw-r--r--libavcodec/wmaprodec.c2
-rw-r--r--libavcodec/wmavoice.c3
-rw-r--r--libavcodec/wnv1.c3
-rw-r--r--libavcodec/ws-snd1.c3
-rw-r--r--libavcodec/xan.c3
-rw-r--r--libavcodec/xl.c3
-rw-r--r--libavcodec/xwddec.c3
-rw-r--r--libavcodec/yop.c3
-rw-r--r--libavcodec/zerocodec.c3
-rw-r--r--libavcodec/zmbv.c3
141 files changed, 286 insertions, 154 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 38fc2f2e64..e3f49b37c4 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -29,6 +29,7 @@
#include "bytestream.h"
#include "dsputil.h"
#include "get_bits.h"
+#include "internal.h"
//#undef NDEBUG
//#include <assert.h>
@@ -833,7 +834,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
avctx->release_buffer(avctx, p);
p->reference = 1;
- 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;
}
@@ -849,7 +850,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 = 1;
- 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;
}
diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c
index 95e811a43c..ea428da628 100644
--- a/libavcodec/8bps.c
+++ b/libavcodec/8bps.c
@@ -38,6 +38,7 @@
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
static const enum AVPixelFormat pixfmt_rgb24[] = {
@@ -83,7 +84,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;
}
diff --git a/libavcodec/8svx.c b/libavcodec/8svx.c
index 1839617b96..dda181b86a 100644
--- a/libavcodec/8svx.c
+++ b/libavcodec/8svx.c
@@ -29,6 +29,7 @@
*/
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/common.h"
/** decoder context */
@@ -136,7 +137,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
esc->frame.nb_samples = buf_size * (is_compr + 1);
- 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;
}
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index a69f055859..f3e9be4aa3 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -181,7 +181,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;
}
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 4336ca5374..74dd8c1e98 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1371,7 +1371,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;
}
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index b6a20e2c32..3b0eb8b9d0 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -23,6 +23,7 @@
#include "bytestream.h"
#include "adpcm.h"
#include "adpcm_data.h"
+#include "internal.h"
/**
* @file
@@ -611,7 +612,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;
}
diff --git a/libavcodec/adxdec.c b/libavcodec/adxdec.c
index 4d2892b4b2..d8ea351858 100644
--- a/libavcodec/adxdec.c
+++ b/libavcodec/adxdec.c
@@ -23,6 +23,7 @@
#include "avcodec.h"
#include "adx.h"
#include "get_bits.h"
+#include "internal.h"
/**
* @file
@@ -142,7 +143,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;
}
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index 242e531def..64c7f5400f 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -49,6 +49,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "bytestream.h"
+#include "internal.h"
#include "unary.h"
#include "mathops.h"
@@ -317,7 +318,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;
}
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index ba9f3bba2e..ff2a735bdf 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -36,6 +36,7 @@
#include "bytestream.h"
#include "bgmc.h"
#include "dsputil.h"
+#include "internal.h"
#include "libavutil/samplefmt.h"
#include "libavutil/crc.h"
@@ -1461,7 +1462,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;
}
diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c
index ccf1b0cb2f..5c359a8f3d 100644
--- a/libavcodec/amrnbdec.c
+++ b/libavcodec/amrnbdec.c
@@ -53,6 +53,7 @@
#include "acelp_pitch_delay.h"
#include "lsp.h"
#include "amr.h"
+#include "internal.h"
#include "amrnbdata.h"
@@ -947,7 +948,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;
}
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index 43ac0c3d4d..01d95f68df 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -35,6 +35,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"
@@ -1093,7 +1094,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;
}
diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c
index 964abc6d20..bee14b86f1 100644
--- a/libavcodec/ansi.c
+++ b/libavcodec/ansi.c
@@ -28,6 +28,7 @@
#include "libavutil/lfg.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) */
@@ -222,7 +223,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;
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 7a6ee413f8..61eecfe273 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -26,6 +26,7 @@
#include "avcodec.h"
#include "dsputil.h"
#include "bytestream.h"
+#include "internal.h"
/**
* @file
@@ -909,7 +910,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;
}
diff --git a/libavcodec/asvdec.c b/libavcodec/asvdec.c
index a546d24020..9f6b93d4db 100644
--- a/libavcodec/asvdec.c
+++ b/libavcodec/asvdec.c
@@ -30,6 +30,7 @@
#include "avcodec.h"
#include "put_bits.h"
#include "dsputil.h"
+#include "internal.h"
#include "mathops.h"
#include "mpeg12data.h"
@@ -194,7 +195,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;
}
diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c
index b746a54e3b..268ce86f01 100644
--- a/libavcodec/atrac1.c
+++ b/libavcodec/atrac1.c
@@ -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;
}
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 5bf992f395..312b283883 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -42,6 +42,7 @@
#include "fft.h"
#include "fmtconvert.h"
#include "get_bits.h"
+#include "internal.h"
#include "atrac.h"
#include "atrac3data.h"
@@ -811,7 +812,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;
}
diff --git a/libavcodec/aura.c b/libavcodec/aura.c
index 9f910212fb..9ca2ef8d02 100644
--- a/libavcodec/aura.c
+++ b/libavcodec/aura.c
@@ -24,6 +24,7 @@
*/
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/internal.h"
typedef struct AuraDecodeContext {
@@ -72,7 +73,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;
}
diff --git a/libavcodec/bfi.c b/libavcodec/bfi.c
index 34c5bd3be5..03d06fa489 100644
--- a/libavcodec/bfi.c
+++ b/libavcodec/bfi.c
@@ -29,6 +29,7 @@
#include "libavutil/common.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
typedef struct BFIContext {
AVCodecContext *avctx;
@@ -61,7 +62,7 @@ static int bfi_decode_frame(AVCodecContext *avctx, void *data,
bfi->frame.reference = 1;
- 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;
}
diff --git a/libavcodec/bink.c b/libavcodec/bink.c
index 636bb20c3f..733b5bdbd7 100644
--- a/libavcodec/bink.c
+++ b/libavcodec/bink.c
@@ -25,6 +25,7 @@
#include "dsputil.h"
#include "binkdata.h"
#include "binkdsp.h"
+#include "internal.h"
#include "mathops.h"
#define BITSTREAM_READER_LE
@@ -1171,7 +1172,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;
}
diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c
index 3a138e560c..0e5d9816ec 100644
--- a/libavcodec/binkaudio.c
+++ b/libavcodec/binkaudio.c
@@ -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;
}
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index b38e056315..ae168556d9 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -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){
@@ -205,7 +206,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;
}
diff --git a/libavcodec/bmv.c b/libavcodec/bmv.c
index 3ff6177c74..762a7fb261 100644
--- a/libavcodec/bmv.c
+++ b/libavcodec/bmv.c
@@ -22,6 +22,7 @@
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
enum BMVFlags{
BMV_NOP = 0,
@@ -242,7 +243,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;
}
@@ -335,7 +336,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;
}
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 3c7f79bafb..5619071a10 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -29,6 +29,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,
@@ -950,7 +951,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;
diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c
index 631c415124..9c9583d06a 100644
--- a/libavcodec/cdgraphics.c
+++ b/libavcodec/cdgraphics.c
@@ -21,6 +21,7 @@
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
/**
* @file
@@ -333,7 +334,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;
diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c
index bc4dfe74fc..b51a2cb00f 100644
--- a/libavcodec/cdxl.c
+++ b/libavcodec/cdxl.c
@@ -23,6 +23,7 @@
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
#define BIT_PLANAR 0x00
#define BYTE_PLANAR 0x20
@@ -262,7 +263,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;
}
diff --git a/libavcodec/cljr.c b/libavcodec/cljr.c
index 13b454727a..c4b12b1d1f 100644
--- a/libavcodec/cljr.c
+++ b/libavcodec/cljr.c
@@ -70,7 +70,7 @@ static int decode_frame(AVCodecContext *avctx,
}
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;
}
diff --git a/libavcodec/cllc.c b/libavcodec/cllc.c
index 467d81953e..30dc53c6e1 100644
--- a/libavcodec/cllc.c
+++ b/libavcodec/cllc.c
@@ -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;
diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c
index caaa9c175b..6eb0e72058 100644
--- a/libavcodec/cngdec.c
+++ b/libavcodec/cngdec.c
@@ -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;
}
diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index f41457d1b0..85565bbd6d 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -49,6 +49,7 @@
#include "dsputil.h"
#include "bytestream.h"
#include "fft.h"
+#include "internal.h"
#include "sinewin.h"
#include "cookdata.h"
@@ -957,7 +958,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;
}
diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c
index 8d0cbb66c8..188df1b4b7 100644
--- a/libavcodec/cscd.c
+++ b/libavcodec/cscd.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/common.h"
#if CONFIG_ZLIB
@@ -153,7 +154,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
c->pic.reference = 1;
c->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_READABLE |
FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
- 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;
}
diff --git a/libavcodec/cyuv.c b/libavcodec/cyuv.c
index 18767d78e8..a11fee2672 100644
--- a/libavcodec/cyuv.c
+++ b/libavcodec/cyuv.c
@@ -34,6 +34,7 @@
#include "avcodec.h"
#include "dsputil.h"
+#include "internal.h"
#include "libavutil/internal.h"
@@ -105,7 +106,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;
}
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index 325f3fe96d..f26111a387 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -45,6 +45,7 @@
#include "synth_filter.h"
#include "dcadsp.h"
#include "fmtconvert.h"
+#include "internal.h"
#if ARCH_ARM
# include "arm/dca.h"
@@ -1835,7 +1836,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;
}
diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
index 1598f47c6c..4f148336f4 100644
--- a/libavcodec/dfa.c
+++ b/libavcodec/dfa.c
@@ -22,6 +22,7 @@
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
@@ -321,7 +322,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;
}
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index e71409b33f..e988d68036 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -30,6 +30,7 @@
#include "get_bits.h"
#include "dnxhddata.h"
#include "dsputil.h"
+#include "internal.h"
typedef struct DNXHDContext {
AVCodecContext *avctx;
@@ -357,7 +358,7 @@ static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if (first_field) {
if (ctx->picture.data[0])
avctx->release_buffer(avctx, &ctx->picture);
- if (avctx->get_buffer(avctx, &ctx->picture) < 0) {
+ if (ff_get_buffer(avctx, &ctx->picture) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c
index fb1c7ce6f2..2726d35c8a 100644
--- a/libavcodec/dpcm.c
+++ b/libavcodec/dpcm.c
@@ -40,6 +40,7 @@
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "mathops.h"
typedef struct DPCMContext {
@@ -210,7 +211,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = out / 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;
}
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index 55f71c987c..2b1c7f8b64 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -23,6 +23,7 @@
#include "libavutil/imgutils.h"
#include "bytestream.h"
#include "avcodec.h"
+#include "internal.h"
typedef struct DPXContext {
AVFrame picture;
@@ -159,7 +160,7 @@ static int decode_frame(AVCodecContext *avctx,
return -1;
if (w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
- 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;
}
diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c
index 4874aa3f95..87979525de 100644
--- a/libavcodec/dsicinav.c
+++ b/libavcodec/dsicinav.c
@@ -27,6 +27,7 @@
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "mathops.h"
@@ -343,7 +344,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;
}
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index 2917de93fa..b4cb23f604 100644
--- a/libavcodec/dvdec.c
+++ b/libavcodec/dvdec.c
@@ -38,6 +38,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"
@@ -334,7 +335,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;
}
diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c
index 84159a4ae9..e634bbecfc 100644
--- a/libavcodec/dxa.c
+++ b/libavcodec/dxa.c
@@ -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;
}
diff --git a/libavcodec/dxtory.c b/libavcodec/dxtory.c
index da43c47003..4ee364bab1 100644
--- a/libavcodec/dxtory.c
+++ b/libavcodec/dxtory.c
@@ -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;
diff --git a/libavcodec/eacmv.c b/libavcodec/eacmv.c
index 532bf94757..d3233bb96d 100644
--- a/libavcodec/eacmv.c
+++ b/libavcodec/eacmv.c
@@ -32,6 +32,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
+#include "internal.h"
typedef struct CmvContext {
AVCodecContext *avctx;
@@ -173,7 +174,7 @@ static int cmv_decode_frame(AVCodecContext *avctx,
s->frame.reference = 1;
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
- 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;
}
diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
index c45b588ae7..ec74051b2f 100644
--- a/libavcodec/eamad.c
+++ b/libavcodec/eamad.c
@@ -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"
@@ -257,7 +258,7 @@ static int decode_frame(AVCodecContext *avctx,
s->frame.reference = 1;
if (!s->frame.data[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;
}
diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c
index d6ee635252..9e3a3e6529 100644
--- a/libavcodec/eatgq.c
+++ b/libavcodec/eatgq.c
@@ -35,6 +35,7 @@
#include "dsputil.h"
#include "aandcttab.h"
#include "eaidct.h"
+#include "internal.h"
typedef struct TgqContext {
AVCodecContext *avctx;
@@ -216,7 +217,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;
}
diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c
index 4c0732785e..51232d0ba2 100644
--- a/libavcodec/eatqi.c
+++ b/libavcodec/eatqi.c
@@ -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;
}
diff --git a/libavcodec/escape124.c b/libavcodec/escape124.c
index 40224fb99d..dce4d0493e 100644
--- a/libavcodec/escape124.c
+++ b/libavcodec/escape124.c
@@ -20,6 +20,7 @@
*/
#include "avcodec.h"
+#include "internal.h"
#define BITSTREAM_READER_LE
#include "get_bits.h"
@@ -266,7 +267,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;
}
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index c5329b42ad..5b1c80cf24 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -31,6 +31,7 @@
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
+#include "internal.h"
#include "get_bits.h"
#include "put_bits.h"
#include "dsputil.h"
@@ -830,7 +831,7 @@ static int ffv1_decode_frame(AVCodecContext *avctx, void *data,
}
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;
}
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index 6b290e2776..fd47929c50 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -531,7 +531,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;
}
diff --git a/libavcodec/frwu.c b/libavcodec/frwu.c
index 63fc193c5f..f4d1cc1967 100644
--- a/libavcodec/frwu.c
+++ b/libavcodec/frwu.c
@@ -22,6 +22,7 @@
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
static av_cold int decode_init(AVCodecContext *avctx)
{
@@ -59,7 +60,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;
}
diff --git a/libavcodec/g722dec.c b/libavcodec/g722dec.c
index 55a23d1c5e..51d5721e8f 100644
--- a/libavcodec/g722dec.c
+++ b/libavcodec/g722dec.c
@@ -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;
}
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
index fe88682d3c..b1fbe9869a 100644
--- a/libavcodec/g723_1.c
+++ b/libavcodec/g723_1.c
@@ -34,6 +34,7 @@
#include "acelp_vectors.h"
#include "celp_filters.h"
#include "g723_1_data.h"
+#include "internal.h"
#define CNG_RANDOM_SEED 12345
@@ -1220,7 +1221,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;
}
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index 402ae3d2ce..3e313b9752 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -454,7 +454,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;
}
diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index 4bb77895ad..d5f1c42255 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -25,6 +25,7 @@
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "lzw.h"
#define GCE_DISPOSAL_NONE 0
@@ -301,7 +302,7 @@ static int gif_decode_frame(AVCodecContext *avctx, void *data, int *data_size, A
if (s->picture.data[0])
avctx->release_buffer(avctx, &s->picture);
- 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;
}
diff --git a/libavcodec/gsmdec.c b/libavcodec/gsmdec.c
index 06e6c33875..4304723439 100644
--- a/libavcodec/gsmdec.c
+++ b/libavcodec/gsmdec.c
@@ -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"
@@ -73,7 +74,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;
}
diff --git a/libavcodec/idcinvideo.c b/libavcodec/idcinvideo.c
index 476b628d82..8ce045dc0f 100644
--- a/libavcodec/idcinvideo.c
+++ b/libavcodec/idcinvideo.c
@@ -49,6 +49,7 @@
#include <string.h>
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/internal.h"
#define HUFFMAN_TABLE_SIZE 64 * 1024
@@ -223,7 +224,7 @@ static int idcin_decode_frame(AVCodecContext *avctx,
if (s->frame.data[0])
avctx->release_buffer(avctx, &s->frame);
- if (avctx->get_buffer(avctx, &s->frame)) {
+ if (ff_get_buffer(avctx, &s->frame)) {
av_log(avctx, AV_LOG_ERROR, " id CIN Video: get_buffer() failed\n");
return -1;
}
diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index 69efa2e87c..4bbb5dda1f 100644
--- a/libavcodec/iff.c
+++ b/libavcodec/iff.c
@@ -29,6 +29,7 @@
#include "bytestream.h"
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
typedef struct {
AVFrame frame;
@@ -260,7 +261,7 @@ static int decode_frame_ilbm(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_GRAY8) {
@@ -317,7 +318,7 @@ static int decode_frame_byterun1(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_GRAY8) {
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index ea6172b61e..5cff70fcb4 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -40,6 +40,7 @@
#include "get_bits.h"
#include "dsputil.h"
#include "fft.h"
+#include "internal.h"
#include "sinewin.h"
#include "imcdata.h"
@@ -939,7 +940,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;
}
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index fc0d2bc11b..fe2ee935bb 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -35,6 +35,7 @@
#include "dsputil.h"
#include "bytestream.h"
#include "get_bits.h"
+#include "internal.h"
#include "indeo3data.h"
@@ -1070,7 +1071,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;
}
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 0f624e201f..9dde654528 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -141,4 +141,11 @@ 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);
+
#endif /* AVCODEC_INTERNAL_H */
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index 60ccf37a17..49db10df2a 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -43,6 +43,7 @@
#include "dsputil.h"
#define BITSTREAM_READER_LE
#include "get_bits.h"
+#include "internal.h"
#define PALETTE_COUNT 256
@@ -972,7 +973,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, " Interplay Video: get_buffer() failed\n");
return -1;
}
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 85661281ad..58a00ce70e 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -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"
@@ -802,7 +803,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;
}
diff --git a/libavcodec/kgv1dec.c b/libavcodec/kgv1dec.c
index bd362bfc23..719192cc9b 100644
--- a/libavcodec/kgv1dec.c
+++ b/libavcodec/kgv1dec.c
@@ -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]) {
diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c
index 2b6774001b..2598590956 100644
--- a/libavcodec/kmvc.c
+++ b/libavcodec/kmvc.c
@@ -29,6 +29,7 @@
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#define KMVC_KEYFRAME 0x80
#define KMVC_PALETTE 0x40
@@ -257,7 +258,7 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPa
ctx->pic.reference = 1;
ctx->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
- if (avctx->get_buffer(avctx, &ctx->pic) < 0) {
+ if (ff_get_buffer(avctx, &ctx->pic) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index c80d0fe30e..4ae2c99d95 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -44,6 +44,7 @@
#include "libavutil/mem.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "lcl.h"
#if CONFIG_ZLIB_DECODER
@@ -180,7 +181,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;
}
diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c
index 55697db069..b4d1c74f8c 100644
--- a/libavcodec/libgsm.c
+++ b/libavcodec/libgsm.c
@@ -200,7 +200,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;
}
diff --git a/libavcodec/libilbc.c b/libavcodec/libilbc.c
index 450f413c5b..9acaa4057d 100644
--- a/libavcodec/libilbc.c
+++ b/libavcodec/libilbc.c
@@ -92,7 +92,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;
}
diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
index 006c85224d..8dc2e9f31f 100644
--- a/libavcodec/libopencore-amr.c
+++ b/libavcodec/libopencore-amr.c
@@ -149,7 +149,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;
}
@@ -347,7 +347,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;
}
diff --git a/libavcodec/libopusdec.c b/libavcodec/libopusdec.c
index 1b5b746496..15fa493498 100644
--- a/libavcodec/libopusdec.c
+++ b/libavcodec/libopusdec.c
@@ -25,6 +25,7 @@
#include "libavutil/avassert.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
#include "vorbis.h"
#include "mathops.h"
#include "libopus.h"
@@ -116,7 +117,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;
diff --git a/libavcodec/libschroedingerdec.c b/libavcodec/libschroedingerdec.c
index 3cd9f9ace2..ae11cc5e2f 100644
--- a/libavcodec/libschroedingerdec.c
+++ b/libavcodec/libschroedingerdec.c
@@ -34,6 +34,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "avcodec.h"
+#include "internal.h"
#include "libschroedinger.h"
#undef NDEBUG
@@ -313,7 +314,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);
}
diff --git a/libavcodec/libspeexdec.c b/libavcodec/libspeexdec.c
index e9442f48c3..8aa82ca7a8 100644
--- a/libavcodec/libspeexdec.c
+++ b/libavcodec/libspeexdec.c
@@ -26,6 +26,7 @@
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "avcodec.h"
+#include "internal.h"
typedef struct {
AVFrame frame;
@@ -118,7 +119,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;
}
diff --git a/libavcodec/loco.c b/libavcodec/loco.c
index 5d0ce05113..a837e4b9bd 100644
--- a/libavcodec/loco.c
+++ b/libavcodec/loco.c
@@ -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,
@@ -170,7 +171,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;
}
diff --git a/libavcodec/mace.c b/libavcodec/mace.c
index 8fef839d60..c78a207a09 100644
--- a/libavcodec/mace.c
+++ b/libavcodec/mace.c
@@ -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;
}
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index ecccd687f1..04249dd97d 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -37,6 +37,7 @@
#include "libavutil/opt.h"
#include "avcodec.h"
#include "dsputil.h"
+#include "internal.h"
#include "mjpeg.h"
#include "mjpegdec.h"
#include "jpeglsdec.h"
@@ -353,7 +354,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;
}
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index cae5136efb..3852f6eff8 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -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"
@@ -920,7 +921,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;
}
diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index 7c9103c7d2..ab6fd9f223 100644
--- a/libavcodec/mpc7.c
+++ b/libavcodec/mpc7.c
@@ -30,6 +30,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
+#include "internal.h"
#include "mpegaudiodsp.h"
#include "mpc.h"
@@ -229,7 +230,7 @@ static int mpc7_decode_frame(AVCodecContext * avctx, void *data,
/* get output buffer */
c->frame.nb_samples = last_frame ? c->lastframelen : 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;
}
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index f43cb4ead6..a270be36fd 100644
--- a/libavcodec/mpc8.c
+++ b/libavcodec/mpc8.c
@@ -30,6 +30,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
+#include "internal.h"
#include "mpegaudiodsp.h"
#include "mpc.h"
@@ -250,7 +251,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;
}
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 5fcea985d2..fda0280b44 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -27,6 +27,7 @@
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
#include "mathops.h"
#include "mpegaudiodsp.h"
#include "dsputil.h"
@@ -1611,7 +1612,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;
}
@@ -1905,7 +1906,7 @@ static int decode_frame_mp3on4(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame->nb_samples = 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;
}
diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c
index bec3f45075..7c65f14fc6 100644
--- a/libavcodec/mss2.c
+++ b/libavcodec/mss2.c
@@ -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;
}
diff --git a/libavcodec/mxpegdec.c b/libavcodec/mxpegdec.c
index 77357fd2e2..13a0d4c078 100644
--- a/libavcodec/mxpegdec.c
+++ b/libavcodec/mxpegdec.c
@@ -25,6 +25,7 @@
* MxPEG decoder
*/
+#include "internal.h"
#include "mjpeg.h"
#include "mjpegdec.h"
@@ -249,7 +250,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);
}
@@ -268,7 +269,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);
}
diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index 1f7905819c..b6aa6f5f82 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -38,6 +38,7 @@
#include "dsputil.h"
#include "fft.h"
#include "fmtconvert.h"
+#include "internal.h"
#include "nellymoser.h"
#include "sinewin.h"
@@ -166,7 +167,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;
}
diff --git a/libavcodec/pcm-mpeg.c b/libavcodec/pcm-mpeg.c
index 4f9f52558f..c8c683d11b 100644
--- a/libavcodec/pcm-mpeg.c
+++ b/libavcodec/pcm-mpeg.c
@@ -27,6 +27,7 @@
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
/*
* Channel Mapping according to
@@ -165,7 +166,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;
}
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index a24a38ba80..d6899cf52d 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -302,7 +302,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;
}
diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c
index 45e751b389..a5c13960bd 100644
--- a/libavcodec/pcx.c
+++ b/libavcodec/pcx.c
@@ -26,6 +26,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "get_bits.h"
+#include "internal.h"
typedef struct PCXContext {
AVFrame picture;
@@ -147,7 +148,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
return -1;
if (w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
- 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;
}
diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c
index a0affc98e8..97d46ad946 100644
--- a/libavcodec/pictordec.c
+++ b/libavcodec/pictordec.c
@@ -28,6 +28,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "cga_data.h"
+#include "internal.h"
typedef struct PicContext {
AVFrame frame;
@@ -146,7 +147,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;
}
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index aaedeff187..0e3805bdb4 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -21,6 +21,7 @@
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "png.h"
#include "pngdsp.h"
@@ -492,7 +493,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");
goto fail;
}
diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c
index 6fdd3f932d..6d2473831b 100644
--- a/libavcodec/pnmdec.c
+++ b/libavcodec/pnmdec.c
@@ -21,6 +21,7 @@
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "put_bits.h"
#include "pnm.h"
@@ -48,7 +49,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
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;
}
diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c
index bbf747fa35..79995791d6 100644
--- a/libavcodec/proresdec.c
+++ b/libavcodec/proresdec.c
@@ -34,6 +34,7 @@
#include "libavutil/intmath.h"
#include "avcodec.h"
+#include "internal.h"
#include "proresdata.h"
#include "proresdsp.h"
#include "get_bits.h"
@@ -626,7 +627,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
avctx->release_buffer(avctx, picture);
picture->reference = 0;
- if (avctx->get_buffer(avctx, picture) < 0)
+ if (ff_get_buffer(avctx, picture) < 0)
return -1;
for (pic_num = 0; ctx->picture.interlaced_frame - pic_num + 1; pic_num++) {
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 0496257fde..73d9da3f1c 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -570,7 +570,7 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt)
pthread_cond_wait(&p->progress_cond, &p->progress_mutex);
if (p->state == STATE_GET_BUFFER) {
- p->result = p->avctx->get_buffer(p->avctx, p->requested_frame);
+ p->result = ff_get_buffer(p->avctx, p->requested_frame);
p->state = STATE_SETTING_UP;
pthread_cond_signal(&p->progress_cond);
}
@@ -921,7 +921,7 @@ int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f)
if (!(avctx->active_thread_type&FF_THREAD_FRAME)) {
f->thread_opaque = NULL;
- return avctx->get_buffer(avctx, f);
+ return ff_get_buffer(avctx, f);
}
if (p->state != STATE_SETTING_UP &&
@@ -943,7 +943,7 @@ int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f)
if (avctx->thread_safe_callbacks ||
avctx->get_buffer == avcodec_default_get_buffer) {
- err = avctx->get_buffer(avctx, f);
+ err = ff_get_buffer(avctx, f);
} else {
p->requested_frame = f;
p->state = STATE_GET_BUFFER;
diff --git a/libavcodec/ptx.c b/libavcodec/ptx.c
index e6835e6f4a..c9b3564409 100644
--- a/libavcodec/ptx.c
+++ b/libavcodec/ptx.c
@@ -23,6 +23,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
+#include "internal.h"
typedef struct PTXContext {
AVFrame picture;
@@ -75,7 +76,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
return -1;
if (w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
- 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;
}
diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c
index d0f41072fd..b702175c19 100644
--- a/libavcodec/qcelpdec.c
+++ b/libavcodec/qcelpdec.c
@@ -699,7 +699,7 @@ static int qcelp_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
q->avframe.nb_samples = 160;
- if ((ret = avctx->get_buffer(avctx, &q->avframe)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &q->avframe)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index 1666242c37..269a051f69 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
@@ -40,6 +40,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
+#include "internal.h"
#include "rdft.h"
#include "mpegaudiodsp.h"
#include "mpegaudio.h"
@@ -1933,7 +1934,7 @@ static int qdm2_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = 16 * 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;
}
diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c
index 934a1fca1b..99692dc170 100644
--- a/libavcodec/qdrw.c
+++ b/libavcodec/qdrw.c
@@ -27,6 +27,7 @@
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
typedef struct QdrawContext{
AVCodecContext *avctx;
@@ -52,7 +53,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;
}
diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c
index 05f94b7e1a..2224e32966 100644
--- a/libavcodec/r210dec.c
+++ b/libavcodec/r210dec.c
@@ -21,6 +21,7 @@
*/
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/bswap.h"
#include "libavutil/common.h"
@@ -52,7 +53,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
pic->reference = 0;
- if (avctx->get_buffer(avctx, pic) < 0)
+ if (ff_get_buffer(avctx, pic) < 0)
return -1;
pic->pict_type = AV_PICTURE_TYPE_I;
diff --git a/libavcodec/ra144dec.c b/libavcodec/ra144dec.c
index 0c6c7d3cfb..1a987fcbd4 100644
--- a/libavcodec/ra144dec.c
+++ b/libavcodec/ra144dec.c
@@ -26,6 +26,7 @@
#include "libavutil/intmath.h"
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
#include "ra144.h"
@@ -80,7 +81,7 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *data,
/* get output buffer */
ractx->frame.nb_samples = NBLOCKS * BLOCKSIZE;
- if ((ret = avctx->get_buffer(avctx, &ractx->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &ractx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index deaafd2d57..8266673aec 100644
--- a/libavcodec/ra288.c
+++ b/libavcodec/ra288.c
@@ -22,6 +22,7 @@
#include "libavutil/channel_layout.h"
#include "libavutil/float_dsp.h"
#include "avcodec.h"
+#include "internal.h"
#define BITSTREAM_READER_LE
#include "get_bits.h"
#include "ra288.h"
@@ -193,7 +194,7 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data,
/* get output buffer */
ractx->frame.nb_samples = RA288_BLOCK_SIZE * RA288_BLOCKS_PER_FRAME;
- if ((ret = avctx->get_buffer(avctx, &ractx->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &ractx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
diff --git a/libavcodec/ralf.c b/libavcodec/ralf.c
index c9c8080dd9..580def3183 100644
--- a/libavcodec/ralf.c
+++ b/libavcodec/ralf.c
@@ -30,6 +30,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
+#include "internal.h"
#include "unary.h"
#include "ralfdata.h"
@@ -463,7 +464,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr,
}
ctx->frame.nb_samples = ctx->max_frame_size;
- if ((ret = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &ctx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "Me fail get_buffer()? That's unpossible!\n");
return ret;
}
diff --git a/libavcodec/rl2.c b/libavcodec/rl2.c
index 84434a29a1..9eea92a4ee 100644
--- a/libavcodec/rl2.c
+++ b/libavcodec/rl2.c
@@ -34,6 +34,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "avcodec.h"
+#include "internal.h"
#define EXTRADATA1_SIZE (6 + 256 * 3) ///< video base, clr count, palette
@@ -183,7 +184,7 @@ static int rl2_decode_frame(AVCodecContext *avctx,
/** get buffer */
s->frame.reference= 0;
- if(avctx->get_buffer(avctx, &s->frame)) {
+ if(ff_get_buffer(avctx, &s->frame)) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c
index a5e0720889..192f1eb6a3 100644
--- a/libavcodec/roqvideoenc.c
+++ b/libavcodec/roqvideoenc.c
@@ -1033,8 +1033,8 @@ static int roq_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
if (enc->first_frame) {
/* Alloc memory for the reconstruction data (we must know the stride
for that) */
- if (avctx->get_buffer(avctx, enc->current_frame) ||
- avctx->get_buffer(avctx, enc->last_frame)) {
+ if (ff_get_buffer(avctx, enc->current_frame) ||
+ ff_get_buffer(avctx, enc->last_frame)) {
av_log(avctx, AV_LOG_ERROR, " RoQ: get_buffer() failed\n");
return -1;
}
diff --git a/libavcodec/s302m.c b/libavcodec/s302m.c
index 132c094935..76fab59e9a 100644
--- a/libavcodec/s302m.c
+++ b/libavcodec/s302m.c
@@ -23,6 +23,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "avcodec.h"
+#include "internal.h"
#include "mathops.h"
#define AES3_HEADER_LEN 4
@@ -96,7 +97,7 @@ static int s302m_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
block_size = (avctx->bits_per_coded_sample + 4) / 4;
s->frame.nb_samples = 2 * (buf_size / block_size) / 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;
}
diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index 412709cfd9..e7791b7e05 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -22,6 +22,7 @@
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "sgi.h"
typedef struct SgiState {
@@ -209,7 +210,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;
}
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index be2b8e20e9..fad69b8d08 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -31,6 +31,7 @@
#include "bytestream.h"
#include "get_bits.h"
#include "golomb.h"
+#include "internal.h"
#define MAX_CHANNELS 8
#define MAX_BLOCKSIZE 65535
@@ -581,7 +582,7 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
if (s->cur_chan == s->channels) {
/* 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;
}
diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c
index 211396bc65..d482b0f068 100644
--- a/libavcodec/sipr.c
+++ b/libavcodec/sipr.c
@@ -31,6 +31,7 @@
#define BITSTREAM_READER_LE
#include "get_bits.h"
#include "dsputil.h"
+#include "internal.h"
#include "lsp.h"
#include "acelp_vectors.h"
@@ -543,7 +544,7 @@ static int sipr_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
ctx->frame.nb_samples = mode_par->frames_per_packet * subframe_size *
mode_par->subframe_count;
- 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;
}
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 61283e83fb..0d11e9cd82 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -33,6 +33,7 @@
#include "libavutil/channel_layout.h"
#include "avcodec.h"
+#include "internal.h"
#include "mathops.h"
#define BITSTREAM_READER_LE
@@ -621,7 +622,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = unp_size / (avctx->channels * (bits + 1));
- 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;
}
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index d69f452e5d..fce45621c6 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -458,7 +458,7 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){
for(j=0; j<MAX_REF_FRAMES; j++)
ff_scale_mv_ref[i][j] = 256*(i+1)/(j+1);
- if ((ret = s->avctx->get_buffer(s->avctx, &s->mconly_picture)) < 0) {
+ if ((ret = s->ff_get_buffer(s->avctx, &s->mconly_picture)) < 0) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
@@ -623,7 +623,7 @@ int ff_snow_frame_start(SnowContext *s){
}
s->current_picture.reference= 1;
- if(s->avctx->get_buffer(s->avctx, &s->current_picture) < 0){
+ if(s->ff_get_buffer(s->avctx, &s->current_picture) < 0){
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c
index c4d290478d..50c55425ab 100644
--- a/libavcodec/snowdec.c
+++ b/libavcodec/snowdec.c
@@ -24,6 +24,7 @@
#include "avcodec.h"
#include "dsputil.h"
#include "dwt.h"
+#include "internal.h"
#include "snow.h"
#include "rangecoder.h"
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 29f53302b0..e60cb65297 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -239,7 +239,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
ff_set_cmp(&s->dsp, s->dsp.me_cmp, s->avctx->me_cmp);
ff_set_cmp(&s->dsp, s->dsp.me_sub_cmp, s->avctx->me_sub_cmp);
- s->avctx->get_buffer(s->avctx, &s->input_picture);
+ s->ff_get_buffer(s->avctx, &s->input_picture);
if(s->avctx->me_method == ME_ITER){
int i;
diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c
index a10f449648..310ac2c7b9 100644
--- a/libavcodec/sunrast.c
+++ b/libavcodec/sunrast.c
@@ -23,6 +23,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
+#include "internal.h"
#include "sunrast.h"
typedef struct SUNRASTContext {
@@ -108,7 +109,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
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;
}
diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c
index 1e52e1cac1..21531f636d 100644
--- a/libavcodec/svq1enc.c
+++ b/libavcodec/svq1enc.c
@@ -551,8 +551,8 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
if (!s->current_picture.data[0]) {
- avctx->get_buffer(avctx, &s->current_picture);
- avctx->get_buffer(avctx, &s->last_picture);
+ ff_get_buffer(avctx, &s->current_picture);
+ ff_get_buffer(avctx, &s->last_picture);
s->scratchbuf = av_malloc(s->current_picture.linesize[0] * 16 * 2);
}
diff --git a/libavcodec/targa.c b/libavcodec/targa.c
index 96d18300dd..027275bd2c 100644
--- a/libavcodec/targa.c
+++ b/libavcodec/targa.c
@@ -23,6 +23,7 @@
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "targa.h"
typedef struct TargaContext {
@@ -150,7 +151,7 @@ static int decode_frame(AVCodecContext *avctx,
return -1;
if(w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
- 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;
}
diff --git a/libavcodec/thread.h b/libavcodec/thread.h
index 7f018fc441..782c03cbcf 100644
--- a/libavcodec/thread.h
+++ b/libavcodec/thread.h
@@ -89,7 +89,7 @@ void ff_thread_await_progress(AVFrame *f, int progress, int field);
/**
* Wrapper around get_buffer() for frame-multithreaded codecs.
- * Call this function instead of avctx->get_buffer(f).
+ * Call this function instead of ff_get_buffer(f).
* Cannot be called after the codec has called ff_thread_finish_setup().
*
* @param avctx The current context.
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 48ce5c1fad..c42a65b9f4 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -33,6 +33,7 @@
#include "lzw.h"
#include "tiff.h"
#include "faxcompr.h"
+#include "internal.h"
#include "mathops.h"
#include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h"
@@ -281,7 +282,7 @@ static int init_image(TiffContext *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) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
diff --git a/libavcodec/tmv.c b/libavcodec/tmv.c
index 8533707f8b..c56635e722 100644
--- a/libavcodec/tmv.c
+++ b/libavcodec/tmv.c
@@ -29,6 +29,7 @@
#include <string.h>
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/internal.h"
#include "cga_data.h"
@@ -50,7 +51,7 @@ static int tmv_decode_frame(AVCodecContext *avctx, void *data,
if (tmv->pic.data[0])
avctx->release_buffer(avctx, &tmv->pic);
- if (avctx->get_buffer(avctx, &tmv->pic) < 0) {
+ if (ff_get_buffer(avctx, &tmv->pic) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
index 7ee155640a..66e3427b78 100644
--- a/libavcodec/truespeech.c
+++ b/libavcodec/truespeech.c
@@ -24,6 +24,7 @@
#include "avcodec.h"
#include "dsputil.h"
#include "get_bits.h"
+#include "internal.h"
#include "truespeech_data.h"
/**
@@ -327,7 +328,7 @@ static int truespeech_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
c->frame.nb_samples = iterations * 240;
- 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;
}
diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c
index 6c40e6cfe7..db2805ebaf 100644
--- a/libavcodec/tscc.c
+++ b/libavcodec/tscc.c
@@ -39,6 +39,7 @@
#include <stdlib.h>
#include "avcodec.h"
+#include "internal.h"
#include "msrledec.h"
#include <zlib.h>
@@ -84,7 +85,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
c->pic.reference = 1;
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;
}
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index e6117488dc..0bd7daba9c 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -32,6 +32,7 @@
#include <limits.h>
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
#include "libavutil/crc.h"
#define FORMAT_SIMPLE 1
@@ -331,7 +332,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = framelen;
- 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;
}
diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
index 072af7e067..8989469237 100644
--- a/libavcodec/twinvq.c
+++ b/libavcodec/twinvq.c
@@ -25,6 +25,7 @@
#include "get_bits.h"
#include "dsputil.h"
#include "fft.h"
+#include "internal.h"
#include "lsp.h"
#include "sinewin.h"
@@ -834,7 +835,7 @@ static int twin_decode_frame(AVCodecContext * avctx, void *data,
/* get output buffer */
if (tctx->discarded_packets >= 2) {
tctx->frame.nb_samples = mtab->size;
- if ((ret = avctx->get_buffer(avctx, &tctx->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &tctx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
diff --git a/libavcodec/txd.c b/libavcodec/txd.c
index 67c8a093f7..8e2605f053 100644
--- a/libavcodec/txd.c
+++ b/libavcodec/txd.c
@@ -25,6 +25,7 @@
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "s3tc.h"
typedef struct TXDContext {
@@ -83,7 +84,7 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
return -1;
if (w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
- 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;
}
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 06f4fc94e4..4909fc4862 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -526,6 +526,11 @@ int avcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame)
}
}
+int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
+{
+ return avctx->get_buffer(avctx, frame);
+}
+
void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic)
{
int i;
@@ -572,7 +577,7 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic)
if (pic->data[0] == NULL) {
/* We will copy from buffer, so must be readable */
pic->buffer_hints |= FF_BUFFER_HINTS_READABLE;
- return s->get_buffer(s, pic);
+ return ff_get_buffer(s, pic);
}
assert(s->pix_fmt == pic->format);
@@ -595,7 +600,7 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic)
pic->data[i] = pic->base[i] = NULL;
pic->opaque = NULL;
/* Allocate new frame */
- if (s->get_buffer(s, pic))
+ if (ff_get_buffer(s, pic))
return -1;
/* Copy image data from old buffer to new buffer */
av_picture_copy((AVPicture *)pic, (AVPicture *)&temp_pic, s->pix_fmt, s->width,
@@ -2152,7 +2157,7 @@ unsigned int avpriv_toupper4(unsigned int x)
int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f)
{
f->owner = avctx;
- return avctx->get_buffer(avctx, f);
+ return ff_get_buffer(avctx, f);
}
void ff_thread_release_buffer(AVCodecContext *avctx, AVFrame *f)
diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index aa08436d75..29a93a8917 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -22,6 +22,7 @@
*/
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/bswap.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
@@ -61,7 +62,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
pic->reference = 0;
- if (avctx->get_buffer(avctx, pic) < 0)
+ if (ff_get_buffer(avctx, pic) < 0)
return -1;
y = (uint16_t*)pic->data[0];
diff --git a/libavcodec/v210x.c b/libavcodec/v210x.c
index 4aad304260..0b9753f733 100644
--- a/libavcodec/v210x.c
+++ b/libavcodec/v210x.c
@@ -19,6 +19,7 @@
*/
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/bswap.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
@@ -58,7 +59,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
}
pic->reference= 0;
- if(avctx->get_buffer(avctx, pic) < 0)
+ if(ff_get_buffer(avctx, pic) < 0)
return -1;
ydst= (uint16_t *)pic->data[0];
diff --git a/libavcodec/v410dec.c b/libavcodec/v410dec.c
index b96ba11fbd..1f44b417a6 100644
--- a/libavcodec/v410dec.c
+++ b/libavcodec/v410dec.c
@@ -23,6 +23,7 @@
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
static av_cold int v410_decode_init(AVCodecContext *avctx)
{
@@ -67,7 +68,7 @@ static int v410_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);
}
diff --git a/libavcodec/vb.c b/libavcodec/vb.c
index 13f965ddbe..f5e15cdb18 100644
--- a/libavcodec/vb.c
+++ b/libavcodec/vb.c
@@ -29,6 +29,7 @@
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
enum VBFlags{
VB_HAS_GMC = 0x01,
@@ -198,7 +199,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
if(c->pic.data[0])
avctx->release_buffer(avctx, &c->pic);
c->pic.reference = 1;
- 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;
}
diff --git a/libavcodec/vble.c b/libavcodec/vble.c
index 5dc274c13c..b761787ef0 100644
--- a/libavcodec/vble.c
+++ b/libavcodec/vble.c
@@ -29,6 +29,7 @@
#include "avcodec.h"
#include "dsputil.h"
#include "get_bits.h"
+#include "internal.h"
#include "mathops.h"
typedef struct {
@@ -129,7 +130,7 @@ static int vble_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
avctx->release_buffer(avctx, pic);
/* Allocate buffer */
- 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);
}
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 6bfba682d1..5e3f96416b 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5022,7 +5022,7 @@ static int vc1_decode_sprites(VC1Context *v, GetBitContext* gb)
v->sprite_output_frame.buffer_hints = FF_BUFFER_HINTS_VALID;
v->sprite_output_frame.reference = 0;
- if (avctx->get_buffer(avctx, &v->sprite_output_frame) < 0) {
+ if (ff_get_buffer(avctx, &v->sprite_output_frame) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
diff --git a/libavcodec/vcr1.c b/libavcodec/vcr1.c
index df5088c9b8..1614dd3061 100644
--- a/libavcodec/vcr1.c
+++ b/libavcodec/vcr1.c
@@ -26,6 +26,7 @@
#include "avcodec.h"
#include "dsputil.h"
+#include "internal.h"
#include "libavutil/internal.h"
typedef struct VCR1Context {
@@ -77,7 +78,7 @@ static int vcr1_decode_frame(AVCodecContext *avctx, void *data,
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;
}
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
index 2fdd27fdb0..14b512acb1 100644
--- a/libavcodec/vmdav.c
+++ b/libavcodec/vmdav.c
@@ -47,6 +47,7 @@
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
#define VMD_HEADER_SIZE 0x330
#define PALETTE_COUNT 256
@@ -432,7 +433,7 @@ static int vmdvideo_decode_frame(AVCodecContext *avctx,
return buf_size;
s->frame.reference = 1;
- if (avctx->get_buffer(avctx, &s->frame)) {
+ if (ff_get_buffer(avctx, &s->frame)) {
av_log(s->avctx, AV_LOG_ERROR, "VMD Video: get_buffer() failed\n");
return -1;
}
@@ -608,7 +609,7 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = ((silent_chunks + audio_chunks) * avctx->block_align) / 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;
}
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 496d4c3f33..b30e614c2f 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -32,6 +32,7 @@
#include "dsputil.h"
#include "fft.h"
#include "fmtconvert.h"
+#include "internal.h"
#include "vorbis.h"
#include "xiph.h"
@@ -1650,7 +1651,7 @@ static int vorbis_decode_frame(AVCodecContext *avccontext, void *data,
/* get output buffer */
vc->frame.nb_samples = vc->blocksize[1] / 2;
- if ((ret = avccontext->get_buffer(avccontext, &vc->frame)) < 0) {
+ if ((ret = ff_get_buffer(avccontext, &vc->frame)) < 0) {
av_log(avccontext, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index d67bdb6bc1..c9490e770b 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -25,6 +25,7 @@
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "vp56.h"
#include "vp56data.h"
@@ -530,7 +531,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if (!is_alpha) {
p->reference = 1;
- 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;
}
diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index 32b094d442..e641a75830 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -71,6 +71,7 @@
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#define PALETTE_COUNT 256
#define VQA_HEADER_SIZE 0x2A
@@ -588,7 +589,7 @@ static int vqa_decode_frame(AVCodecContext *avctx,
if (s->frame.data[0])
avctx->release_buffer(avctx, &s->frame);
- if (avctx->get_buffer(avctx, &s->frame)) {
+ if (ff_get_buffer(avctx, &s->frame)) {
av_log(s->avctx, AV_LOG_ERROR, " VQA Video: get_buffer() failed\n");
return -1;
}
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index a0ce4a3f64..e8f34fa632 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -24,6 +24,7 @@
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
#include "unary.h"
/**
@@ -1207,7 +1208,7 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = s->samples;
- 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;
}
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index eb7fe7c25e..e2803bb2a3 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -34,6 +34,7 @@
*/
#include "avcodec.h"
+#include "internal.h"
#include "wma.h"
#undef NDEBUG
@@ -821,7 +822,7 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = nb_frames * 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;
}
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index bd930135a2..a36c2c21c3 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -1015,7 +1015,7 @@ static int decode_frame(WmallDecodeCtx *s)
int more_frames = 0, len = 0, i, ret;
s->frame.nb_samples = s->samples_per_frame;
- if ((ret = s->avctx->get_buffer(s->avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(s->avctx, &s->frame)) < 0) {
/* return an error if no frame could be decoded at all */
av_log(s->avctx, AV_LOG_ERROR,
"not enough space for the output samples\n");
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index ac0cce16bd..321c25d9f1 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -1369,7 +1369,7 @@ static int decode_frame(WMAProDecodeCtx *s, int *got_frame_ptr)
/* get output buffer */
s->frame.nb_samples = s->samples_per_frame;
- 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");
s->packet_loss = 1;
return 0;
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index 2ee235cffc..08d0600200 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -33,6 +33,7 @@
#include "libavutil/mem.h"
#include "dsputil.h"
#include "avcodec.h"
+#include "internal.h"
#include "get_bits.h"
#include "put_bits.h"
#include "wmavoice_data.h"
@@ -1801,7 +1802,7 @@ static int synth_superframe(AVCodecContext *ctx, int *got_frame_ptr)
/* get output buffer */
s->frame.nb_samples = 480;
- if ((res = ctx->get_buffer(ctx, &s->frame)) < 0) {
+ if ((res = ff_get_buffer(ctx, &s->frame)) < 0) {
av_log(ctx, AV_LOG_ERROR, "get_buffer() failed\n");
return res;
}
diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c
index 3abbce2619..3daac0b160 100644
--- a/libavcodec/wnv1.c
+++ b/libavcodec/wnv1.c
@@ -26,6 +26,7 @@
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
#include "mathops.h"
@@ -80,7 +81,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");
av_free(rbuf);
return -1;
diff --git a/libavcodec/ws-snd1.c b/libavcodec/ws-snd1.c
index 036316c4e3..62e0c6f656 100644
--- a/libavcodec/ws-snd1.c
+++ b/libavcodec/ws-snd1.c
@@ -25,6 +25,7 @@
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
/**
* @file
@@ -89,7 +90,7 @@ static int ws_snd_decode_frame(AVCodecContext *avctx, void *data,
/* get output buffer */
s->frame.nb_samples = out_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;
}
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index e6bfc0da06..871bc13681 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -38,6 +38,7 @@
#include "bytestream.h"
#define BITSTREAM_READER_LE
#include "get_bits.h"
+#include "internal.h"
#define RUNTIME_GAMMA 0
@@ -559,7 +560,7 @@ static int xan_decode_frame(AVCodecContext *avctx,
return AVERROR_INVALIDDATA;
}
- if ((ret = avctx->get_buffer(avctx, &s->current_frame))) {
+ if ((ret = ff_get_buffer(avctx, &s->current_frame))) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
diff --git a/libavcodec/xl.c b/libavcodec/xl.c
index b63315850c..a8c392a767 100644
--- a/libavcodec/xl.c
+++ b/libavcodec/xl.c
@@ -27,6 +27,7 @@
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
typedef struct VideoXLContext{
AVCodecContext *avctx;
@@ -57,7 +58,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;
}
diff --git a/libavcodec/xwddec.c b/libavcodec/xwddec.c
index 4cec6152c5..07d1e2ce57 100644
--- a/libavcodec/xwddec.c
+++ b/libavcodec/xwddec.c
@@ -23,6 +23,7 @@
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "xwd.h"
static av_cold int xwd_decode_init(AVCodecContext *avctx)
@@ -208,7 +209,7 @@ static int xwd_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;
}
diff --git a/libavcodec/yop.c b/libavcodec/yop.c
index f1ab5255fe..0240a8cc9f 100644
--- a/libavcodec/yop.c
+++ b/libavcodec/yop.c
@@ -27,6 +27,7 @@
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
typedef struct YopDecContext {
AVFrame frame;
@@ -198,7 +199,7 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if (s->frame.data[0])
avctx->release_buffer(avctx, &s->frame);
- 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;
diff --git a/libavcodec/zerocodec.c b/libavcodec/zerocodec.c
index c6a9ba94a2..e5edb5f0ed 100644
--- a/libavcodec/zerocodec.c
+++ b/libavcodec/zerocodec.c
@@ -19,6 +19,7 @@
#include <zlib.h>
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/common.h"
typedef struct {
@@ -58,7 +59,7 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
}
- 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);
}
diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
index 8fb1538514..33949ce25a 100644
--- a/libavcodec/zmbv.c
+++ b/libavcodec/zmbv.c
@@ -30,6 +30,7 @@
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
#include <zlib.h>
@@ -412,7 +413,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
c->pic.reference = 1;
c->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
- 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;
}