]> git.sesse.net Git - ffmpeg/commitdiff
lavc: add a wrapper for AVCodecContext.get_buffer().
authorAnton Khirnov <anton@khirnov.net>
Sat, 10 Nov 2012 12:22:56 +0000 (13:22 +0100)
committerAnton Khirnov <anton@khirnov.net>
Tue, 4 Dec 2012 20:41:59 +0000 (21:41 +0100)
It will be useful in the upcoming transition to refcounted AVFrames.

141 files changed:
libavcodec/4xm.c
libavcodec/8bps.c
libavcodec/8svx.c
libavcodec/aacdec.c
libavcodec/ac3dec.c
libavcodec/adpcm.c
libavcodec/adxdec.c
libavcodec/alac.c
libavcodec/alsdec.c
libavcodec/amrnbdec.c
libavcodec/amrwbdec.c
libavcodec/ansi.c
libavcodec/apedec.c
libavcodec/asvdec.c
libavcodec/atrac1.c
libavcodec/atrac3.c
libavcodec/aura.c
libavcodec/bfi.c
libavcodec/bink.c
libavcodec/binkaudio.c
libavcodec/bmp.c
libavcodec/bmv.c
libavcodec/cavsdec.c
libavcodec/cdgraphics.c
libavcodec/cdxl.c
libavcodec/cljr.c
libavcodec/cllc.c
libavcodec/cngdec.c
libavcodec/cook.c
libavcodec/cscd.c
libavcodec/cyuv.c
libavcodec/dcadec.c
libavcodec/dfa.c
libavcodec/dnxhddec.c
libavcodec/dpcm.c
libavcodec/dpx.c
libavcodec/dsicinav.c
libavcodec/dvdec.c
libavcodec/dxa.c
libavcodec/dxtory.c
libavcodec/eacmv.c
libavcodec/eamad.c
libavcodec/eatgq.c
libavcodec/eatqi.c
libavcodec/escape124.c
libavcodec/ffv1dec.c
libavcodec/flacdec.c
libavcodec/frwu.c
libavcodec/g722dec.c
libavcodec/g723_1.c
libavcodec/g726.c
libavcodec/gifdec.c
libavcodec/gsmdec.c
libavcodec/idcinvideo.c
libavcodec/iff.c
libavcodec/imc.c
libavcodec/indeo3.c
libavcodec/internal.h
libavcodec/interplayvideo.c
libavcodec/ivi_common.c
libavcodec/kgv1dec.c
libavcodec/kmvc.c
libavcodec/lcldec.c
libavcodec/libgsm.c
libavcodec/libilbc.c
libavcodec/libopencore-amr.c
libavcodec/libopusdec.c
libavcodec/libschroedingerdec.c
libavcodec/libspeexdec.c
libavcodec/loco.c
libavcodec/mace.c
libavcodec/mjpegdec.c
libavcodec/mlpdec.c
libavcodec/mpc7.c
libavcodec/mpc8.c
libavcodec/mpegaudiodec.c
libavcodec/mss2.c
libavcodec/mxpegdec.c
libavcodec/nellymoserdec.c
libavcodec/pcm-mpeg.c
libavcodec/pcm.c
libavcodec/pcx.c
libavcodec/pictordec.c
libavcodec/pngdec.c
libavcodec/pnmdec.c
libavcodec/proresdec.c
libavcodec/pthread.c
libavcodec/ptx.c
libavcodec/qcelpdec.c
libavcodec/qdm2.c
libavcodec/qdrw.c
libavcodec/r210dec.c
libavcodec/ra144dec.c
libavcodec/ra288.c
libavcodec/ralf.c
libavcodec/rl2.c
libavcodec/roqvideoenc.c
libavcodec/s302m.c
libavcodec/sgidec.c
libavcodec/shorten.c
libavcodec/sipr.c
libavcodec/smacker.c
libavcodec/snow.c
libavcodec/snowdec.c
libavcodec/snowenc.c
libavcodec/sunrast.c
libavcodec/svq1enc.c
libavcodec/targa.c
libavcodec/thread.h
libavcodec/tiff.c
libavcodec/tmv.c
libavcodec/truespeech.c
libavcodec/tscc.c
libavcodec/tta.c
libavcodec/twinvq.c
libavcodec/txd.c
libavcodec/utils.c
libavcodec/v210dec.c
libavcodec/v210x.c
libavcodec/v410dec.c
libavcodec/vb.c
libavcodec/vble.c
libavcodec/vc1dec.c
libavcodec/vcr1.c
libavcodec/vmdav.c
libavcodec/vorbisdec.c
libavcodec/vp56.c
libavcodec/vqavideo.c
libavcodec/wavpack.c
libavcodec/wmadec.c
libavcodec/wmalosslessdec.c
libavcodec/wmaprodec.c
libavcodec/wmavoice.c
libavcodec/wnv1.c
libavcodec/ws-snd1.c
libavcodec/xan.c
libavcodec/xl.c
libavcodec/xwddec.c
libavcodec/yop.c
libavcodec/zerocodec.c
libavcodec/zmbv.c

index 38fc2f2e64fd740cc8743e3a6f9bf8220cd51c87..e3f49b37c48d795ac5e24b4503bf39107cd9378c 100644 (file)
@@ -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;
             }
index 95e811a43cd00ea937c8849b472959e71da21a0f..ea428da628bc2ece3f3c9cde1455d540a1f11921 100644 (file)
@@ -38,6 +38,7 @@
 #include "libavutil/internal.h"
 #include "libavutil/intreadwrite.h"
 #include "avcodec.h"
+#include "internal.h"
 
 
 static const enum AVPixelFormat pixfmt_rgb24[] = {
@@ -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;
     }
index 1839617b96fdacbbbd516c59d984a34b0829dca1..dda181b86a94e55a38511a233d06d43fbaaa10fe 100644 (file)
@@ -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;
     }
index a69f0558595c4145649ce51df83d8383f1d40e69..f3e9be4aa3c442eeea6b5dc8aea4abad9da86b4d 100644 (file)
@@ -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;
     }
index 4336ca5374faf09d1cafa00e5bb5544a988a7f37..74dd8c1e98abdc0e152e79e63d942681523112c2 100644 (file)
@@ -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;
     }
index b6a20e2c322012840c12d98c91081d787b6796b0..3b0eb8b9d0df3e775b50f6e77770068e5965cc8f 100644 (file)
@@ -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;
     }
index 4d2892b4b2fc621c44e9888ae573b70ba8c571c3..d8ea351858fe9ff56d07ab08395cd46392fb7a02 100644 (file)
@@ -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;
     }
index 242e531def250a0ed585710c2e04b735245e0367..64c7f5400f160e71a246b6ca12d556889990f573 100644 (file)
@@ -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;
         }
index ba9f3bba2e6b75fc139159817b2a1802c72d9917..ff2a735bdffb3cd8b6276b1a4282f8272435c087 100644 (file)
@@ -36,6 +36,7 @@
 #include "bytestream.h"
 #include "bgmc.h"
 #include "dsputil.h"
+#include "internal.h"
 #include "libavutil/samplefmt.h"
 #include "libavutil/crc.h"
 
@@ -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;
     }
index ccf1b0cb2fcec19026806c9518cf3cae90d8ef07..5c359a8f3d0f98d0690d342c2b2ad34c5b44edf8 100644 (file)
@@ -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;
     }
index 43ac0c3d4d4c3c215c77d3e6a7b866c3938a43e6..01d95f68df35d8bd82d34b70abeaf1c370747b79 100644 (file)
@@ -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;
     }
index 964abc6d20fde8da4636ee22f8ff26a54b1b8ec2..bee14b86f1259a45e6d0c90069ebd91b979d0b26 100644 (file)
@@ -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;
index 7a6ee413f8a310e1ea147432e0f2ef2ff416eddc..61eecfe27328b637ddd2d11e222ba7b9ccab747d 100644 (file)
@@ -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;
     }
index a546d240200bad87fad5bb31afc2609557d3129e..9f6b93d4db9c023d6c42a0f80c98062034052aac 100644 (file)
@@ -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;
     }
index b746a54e3b38f910dc5041aaeb085f927bc21462..268ce86f013894b2a8d1f0759829bcbe507d9ec5 100644 (file)
@@ -36,6 +36,7 @@
 #include "get_bits.h"
 #include "dsputil.h"
 #include "fft.h"
+#include "internal.h"
 #include "sinewin.h"
 
 #include "atrac.h"
@@ -286,7 +287,7 @@ static int atrac1_decode_frame(AVCodecContext *avctx, void *data,
 
     /* get output buffer */
     q->frame.nb_samples = AT1_SU_SAMPLES;
-    if ((ret = avctx->get_buffer(avctx, &q->frame)) < 0) {
+    if ((ret = ff_get_buffer(avctx, &q->frame)) < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return ret;
     }
index 5bf992f39547805c555686e8a33bd5989d87a909..312b28388303a7870f5159b60d3a7a67a4400fc3 100644 (file)
@@ -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;
     }
index 9f910212fba1b6add28b3c06e26b1a7829d82fca..9ca2ef8d02fdeba3c01cc96a4d365e35d129846d 100644 (file)
@@ -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;
     }
index 34c5bd3be5a324c8b98032ca7ac135483949cc03..03d06fa489a573e53a7824bb02d2f4f8adf12cad 100644 (file)
@@ -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;
     }
index 636bb20c3ff4f19e89a4df10a2705e826ac48271..733b5bdbd799ae1be2d0795895aace88081988de 100644 (file)
@@ -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;
         }
index 3a138e560c8c813765fa72ec12a6e32b87ae6107..0e5d9816ecdf98919fa5be09cd2754be1a27d9d4 100644 (file)
@@ -36,6 +36,7 @@
 #include "dct.h"
 #include "rdft.h"
 #include "fmtconvert.h"
+#include "internal.h"
 #include "libavutil/intfloat.h"
 
 extern const uint16_t ff_wma_critical_freqs[25];
@@ -321,7 +322,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
 
     /* get output buffer */
     s->frame.nb_samples = s->frame_len;
-    if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+    if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return ret;
     }
index b38e056315ea27687f174cf53df152493acc8e70..ae168556d93144a1e0eb30a05fcb90f7fed7c02b 100644 (file)
@@ -22,6 +22,7 @@
 #include "avcodec.h"
 #include "bytestream.h"
 #include "bmp.h"
+#include "internal.h"
 #include "msrledec.h"
 
 static av_cold int bmp_decode_init(AVCodecContext *avctx){
@@ -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;
     }
index 3ff6177c74d877b5c5710632af462662d33b31d1..762a7fb2617b2e8dd4aaf1ae95e2c5fd120aaf26 100644 (file)
@@ -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;
     }
index 3c7f79bafbc1d226e525d2f5ecd3ef3368aceb90..5619071a1039dda0733f7aa82bf0755e0255198a 100644 (file)
@@ -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;
 
index 631c415124f10afff46fee02bb40055bbeb77645..9c9583d06af53d2e5e80244c4ede164229517c22 100644 (file)
@@ -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;
index bc4dfe74fce8c5a63063d2e742c8db0621e1019f..b51a2cb00f7126009cd96c89f3921beca6d6dd92 100644 (file)
@@ -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;
     }
index 13b454727a2f11ee24c90ef2364172ebf5bc79e1..c4b12b1d1f40d74f541c9115153030cd54794268 100644 (file)
@@ -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;
     }
index 467d81953e0e7a84092f92195d942752476755a0..30dc53c6e11b58bfbe696c36a7f12c030daf9af6 100644 (file)
@@ -24,6 +24,7 @@
 #include "dsputil.h"
 #include "get_bits.h"
 #include "avcodec.h"
+#include "internal.h"
 
 typedef struct CLLCContext {
     DSPContext dsp;
@@ -333,7 +334,7 @@ static int cllc_decode_frame(AVCodecContext *avctx, void *data,
         avctx->pix_fmt             = AV_PIX_FMT_RGB24;
         avctx->bits_per_raw_sample = 8;
 
-        ret = avctx->get_buffer(avctx, pic);
+        ret = ff_get_buffer(avctx, pic);
         if (ret < 0) {
             av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n");
             return ret;
@@ -348,7 +349,7 @@ static int cllc_decode_frame(AVCodecContext *avctx, void *data,
         avctx->pix_fmt             = AV_PIX_FMT_ARGB;
         avctx->bits_per_raw_sample = 8;
 
-        ret = avctx->get_buffer(avctx, pic);
+        ret = ff_get_buffer(avctx, pic);
         if (ret < 0) {
             av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n");
             return ret;
index caaa9c175b6beadecfd60d7dca28c4db7d25ee7c..6eb0e72058d660fb8a0a9f2bafffb477839cae3a 100644 (file)
@@ -24,6 +24,7 @@
 #include "libavutil/common.h"
 #include "avcodec.h"
 #include "celp_filters.h"
+#include "internal.h"
 #include "libavutil/lfg.h"
 
 typedef struct CNGContext {
@@ -144,7 +145,7 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data,
                                  p->excitation, avctx->frame_size, p->order);
 
     p->avframe.nb_samples = avctx->frame_size;
-    if ((ret = avctx->get_buffer(avctx, &p->avframe)) < 0) {
+    if ((ret = ff_get_buffer(avctx, &p->avframe)) < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return ret;
     }
index f41457d1b014e1bbbb3b602b76eff5dbc76638cb..85565bbd6d338a3aeb512800f41cccda7701ba23 100644 (file)
@@ -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;
         }
index 8d0cbb66c8c4c8ece07973869f21b675f1a315e3..188df1b4b76e40057de1d1655966c925aa821ef4 100644 (file)
@@ -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;
     }
index 18767d78e89bc5d0a9a9c7a07afc5f3cd4077b1f..a11fee26722bbbbbae6a1e0a39897bd99aaeed11 100644 (file)
@@ -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;
     }
index 325f3fe96dc8eb9586fcdf21c8acf889e1249862..f26111a3876602dc8e8364e821ce971963e8689a 100644 (file)
@@ -45,6 +45,7 @@
 #include "synth_filter.h"
 #include "dcadsp.h"
 #include "fmtconvert.h"
+#include "internal.h"
 
 #if ARCH_ARM
 #   include "arm/dca.h"
@@ -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;
     }
index 1598f47c6c314a7dce0e2598cbd83560d30190de..4f148336f470527fd68089ca652c752fcd474e55 100644 (file)
@@ -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;
     }
index e71409b33ffa0a30db7dced43341e973c6b491e5..e988d68036a81308dc5d8b7892f211e46ebfda62 100644 (file)
@@ -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;
         }
index fb1c7ce6f20fef43ef807175831b75859b9ecb3d..2726d35c8a4cc4a6178fed4487821a0fcc9d8f4c 100644 (file)
@@ -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;
     }
index 55f71c987c62c05dd6194158051ab404b5ecedfb..2b1c7f8b647e284cfbcd3443d54ee6ef7a22ec2c 100644 (file)
@@ -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;
     }
index 4874aa3f950bc2ed7a8c711c3cf61babcb542a4e..87979525de829a54eba651fae83b069418243d42 100644 (file)
@@ -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;
     }
index 2917de93fa31541a1673d9bf6996762c5e3a0f64..b4cb23f60489bfb69b3d2576e05ad29a992d0d74 100644 (file)
@@ -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;
     }
index 84159a4ae977e45cfb36cfabcd5764e3c7231931..e634bbecfc0be8205495e096ee53308e6bfa37a2 100644 (file)
@@ -30,6 +30,7 @@
 #include "libavutil/common.h"
 #include "libavutil/intreadwrite.h"
 #include "avcodec.h"
+#include "internal.h"
 
 #include <zlib.h>
 
@@ -215,7 +216,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
         buf_size -= 768+4;
     }
 
-    if(avctx->get_buffer(avctx, &c->pic) < 0){
+    if(ff_get_buffer(avctx, &c->pic) < 0){
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return -1;
     }
index da43c4700364adb83b2cd5ee92a8f7f7293ece49..4ee364bab172ab82cff399431fa368d12d244bf3 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include "avcodec.h"
+#include "internal.h"
 #include "libavutil/common.h"
 #include "libavutil/intreadwrite.h"
 
@@ -52,7 +53,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     }
 
     pic->reference = 0;
-    if ((ret = avctx->get_buffer(avctx, pic)) < 0)
+    if ((ret = ff_get_buffer(avctx, pic)) < 0)
         return ret;
 
     pic->pict_type = AV_PICTURE_TYPE_I;
index 532bf94757333a856fbf125fd866f20ca833a695..d3233bb96d058a078afc14d907b6ca80cff3b5ae 100644 (file)
@@ -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;
     }
index c45b588ae7a3ff3ee9ab7e88d00e86b9ac5977d3..ec74051b2fab15417e9166b7d108b8d80125d5ec 100644 (file)
@@ -33,6 +33,7 @@
 #include "dsputil.h"
 #include "aandcttab.h"
 #include "eaidct.h"
+#include "internal.h"
 #include "mpeg12.h"
 #include "mpeg12data.h"
 #include "libavutil/imgutils.h"
@@ -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;
         }
index d6ee6352523a1df7785c1d935c9287c9d2d14dc4..9e3a3e652915e798f73758aadd43e4e0a5038bcc 100644 (file)
@@ -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;
         }
index 4c0732785e9e6c463b780fa9e77703085f26abf3..51232d0ba2b4a6999c13538a2cd41e16009d31ab 100644 (file)
@@ -31,6 +31,7 @@
 #include "dsputil.h"
 #include "aandcttab.h"
 #include "eaidct.h"
+#include "internal.h"
 #include "mpeg12.h"
 #include "mpegvideo.h"
 
@@ -116,7 +117,7 @@ static int tqi_decode_frame(AVCodecContext *avctx,
     if (s->avctx->width!=s->width || s->avctx->height!=s->height)
         avcodec_set_dimensions(s->avctx, s->width, s->height);
 
-    if(avctx->get_buffer(avctx, &t->frame) < 0) {
+    if(ff_get_buffer(avctx, &t->frame) < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return -1;
     }
index 40224fb99df0cadd0b4ee7ed6a01129a30cbf8f4..dce4d0493e4c7a25a7ef8e879d69fedcb68d6de4 100644 (file)
@@ -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;
     }
index c5329b42ad489a61e586a6b0c8d0286f984e6310..5b1c80cf240af88db83d83d8365b82bd89aeb674 100644 (file)
@@ -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;
     }
index 6b290e2776c80c3d709f6d0c37085dc1680e8b2c..fd47929c50c89734e6e60907a47bf2fbf1d30c7b 100644 (file)
@@ -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;
     }
index 63fc193c5fef96177c74cf0915cbd40d8ef70fc9..f4d1cc1967609695c2f9594a01d8518699b23178 100644 (file)
@@ -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;
     }
index 55a23d1c5e4fd3cb3029431cf8d19c8f8f7108ae..51d5721e8fbe5180e8572e2fe5942aaf56eada03 100644 (file)
@@ -39,6 +39,7 @@
 #include "avcodec.h"
 #include "get_bits.h"
 #include "g722.h"
+#include "internal.h"
 
 #define OFFSET(x) offsetof(G722Context, x)
 #define AD AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM
@@ -95,7 +96,7 @@ static int g722_decode_frame(AVCodecContext *avctx, void *data,
 
     /* get output buffer */
     c->frame.nb_samples = avpkt->size * 2;
-    if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
+    if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return ret;
     }
index fe88682d3c7a8d4255a953301902fc6af7914115..b1fbe9869a97a53efda4854dca12f9fd3882e34f 100644 (file)
@@ -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;
     }
index 402ae3d2ce93c2624455a01ff1f9723a03725873..3e313b9752d235bcc44d3f23686bd65db29596a2 100644 (file)
@@ -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;
     }
index 4bb77895ad1dfd609b903c17bfbbbbf61e4392e0..d5f1c42255e13067fb14815f09d840ec9fa63551 100644 (file)
@@ -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;
     }
index 06e6c33875e5e7928981c31091d089f328336cc2..43047234391b33f55581d18d63bff6574eb0fb18 100644 (file)
@@ -27,6 +27,7 @@
 #include "libavutil/channel_layout.h"
 #include "avcodec.h"
 #include "get_bits.h"
+#include "internal.h"
 #include "msgsmdec.h"
 
 #include "gsmdec_template.c"
@@ -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;
     }
index 476b628d82e268cff0c33671b73bc098da40e883..8ce045dc0f814d8150480afbc8be96a1f5e23828 100644 (file)
@@ -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;
     }
index 69efa2e87c13bf1c5fa2171c1ee60e9b39b37f3a..4bbb5dda1f698300afab39aeaf191f290d15612a 100644 (file)
@@ -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) {
index ea6172b61e3ead07c8e40b9a7172fda788df525d..5cff70fcb4dc385b36826a91ee6051c40905f5b3 100644 (file)
@@ -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;
     }
index fc0d2bc11b6a864a0155c63b39d8693d039b6c3e..fe2ee935bb808105363a635415363ff4e397ef3c 100644 (file)
@@ -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;
     }
index 0f624e201f15a3df47dee203fe9088de968e1695..9dde654528f4514f7cb3c35078388afa63019f7a 100644 (file)
@@ -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 */
index 60ccf37a1756ea53fa566705bbaa04d453fd9688..49db10df2aeee64e1b6b669c1923700dd24ea644 100644 (file)
@@ -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;
     }
index 85661281ad5770042239bb6a967b648a59b78bda..58a00ce70e73e019194ae80235b3fc63acf684e5 100644 (file)
@@ -30,6 +30,7 @@
 #include "libavutil/attributes.h"
 #include "avcodec.h"
 #include "get_bits.h"
+#include "internal.h"
 #include "mathops.h"
 #include "ivi_common.h"
 #include "ivi_dsp.h"
@@ -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;
     }
index bd362bfc235c2b47053f4e124eed8bb91cc7492a..719192cc9b7e069372d8ff05c5960c28dd48a58f 100644 (file)
@@ -28,6 +28,7 @@
 #include "libavutil/intreadwrite.h"
 #include "libavutil/imgutils.h"
 #include "avcodec.h"
+#include "internal.h"
 
 typedef struct {
     AVCodecContext *avctx;
@@ -71,7 +72,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
     maxcnt = w * h;
 
     c->cur.reference = 3;
-    if ((res = avctx->get_buffer(avctx, &c->cur)) < 0)
+    if ((res = ff_get_buffer(avctx, &c->cur)) < 0)
         return res;
     out  = (uint16_t *) c->cur.data[0];
     if (c->prev.data[0]) {
index 2b6774001b7076aade11fd81b218c3de3a7790d2..2598590956e4642ffb0de84e14ac385441508390 100644 (file)
@@ -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;
     }
index c80d0fe30e80acf90fc9d6df4a779126a8806df3..4ae2c99d9561ff8336515d38a50720b467797e87 100644 (file)
@@ -44,6 +44,7 @@
 #include "libavutil/mem.h"
 #include "avcodec.h"
 #include "bytestream.h"
+#include "internal.h"
 #include "lcl.h"
 
 #if CONFIG_ZLIB_DECODER
@@ -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;
     }
index 55697db06902fd2351d6b17a9fc623a4bcce554f..b4d1c74f8ce6c6610e52c5a263b07a26cea6983b 100644 (file)
@@ -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;
     }
index 450f413c5b5c89f73430f94433e04d54f543b67d..9acaa4057debaf038af2ad2c98b86be4af3ebda3 100644 (file)
@@ -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;
     }
index 006c85224de96b77de2aca32fd51ac65c2ddf58b..8dc2e9f31fc12634e54812e9fafb44a877148a64 100644 (file)
@@ -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;
     }
index 1b5b7464961d3cf1300bd1bad106500096fcda8c..15fa4934982674e9a7114816d8726e1b9309e997 100644 (file)
@@ -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;
index 3cd9f9ace24e9826ddb120bdf283404e28ab7dd2..ae11cc5e2f2a38b6c487d45c071c2160776ceb88 100644 (file)
@@ -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);
         }
index e9442f48c332bc9b3dfc3fb8a78c72ace8088e14..8aa82ca7a8cbd38ea1f9670e82437eebc0d1ee24 100644 (file)
@@ -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;
     }
index 5d0ce05113ff8041385d2273ed5a88b34d9f677c..a837e4b9bd147700997a906b6df6796f498e30a6 100644 (file)
@@ -27,6 +27,7 @@
 #include "avcodec.h"
 #include "get_bits.h"
 #include "golomb.h"
+#include "internal.h"
 #include "mathops.h"
 
 enum LOCO_MODE {LOCO_UNKN=0, LOCO_CYUY2=-1, LOCO_CRGB=-2, LOCO_CRGBA=-3, LOCO_CYV12=-4,
@@ -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;
     }
index 8fef839d60e0dab607184e7983fe21a65d661cc7..c78a207a09d0c2f6c875762b11f44a5a49db09cc 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include "avcodec.h"
+#include "internal.h"
 #include "libavutil/common.h"
 
 /*
@@ -250,7 +251,7 @@ static int mace_decode_frame(AVCodecContext *avctx, void *data,
 
     /* get output buffer */
     ctx->frame.nb_samples = 3 * (buf_size << (1 - is_mace3)) / avctx->channels;
-    if ((ret = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
+    if ((ret = ff_get_buffer(avctx, &ctx->frame)) < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return ret;
     }
index ecccd687f1f39a3b196ff03f7514abde43614c2f..04249dd97d0675cbef614213b890827aa1b5c645 100644 (file)
@@ -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;
     }
index cae5136efbf951190ee58a371ad8fc7b4a3e987a..3852f6eff88488b05c4986591cdf04c7d401c75f 100644 (file)
@@ -29,6 +29,7 @@
 #include "avcodec.h"
 #include "libavutil/intreadwrite.h"
 #include "get_bits.h"
+#include "internal.h"
 #include "libavutil/crc.h"
 #include "parser.h"
 #include "mlp_parser.h"
@@ -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;
     }
index 7c9103c7d2227728c2c61e9371bc118e02a6cb8b..ab6fd9f2231f3efc53575b202f92bb0e590b8f81 100644 (file)
@@ -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;
     }
index f43cb4ead632e61e90a1a23b64a2fc16942e5de7..a270be36fd36af5ab25c321eac15684cb3eb4a4a 100644 (file)
@@ -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;
     }
index 5fcea985d21fa6c92b3416253332e97cb6bd5926..fda0280b44dd7a678054a65fb3c6cde2b19d38e9 100644 (file)
@@ -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;
     }
index bec3f4507536c275e7861af6e4e34d7c9b56bb76..7c65f14fc6a165ae536367f4a2479f39b2f2bc98 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include "libavutil/avassert.h"
+#include "internal.h"
 #include "msmpeg4data.h"
 #include "vc1.h"
 #include "mss12.h"
@@ -605,7 +606,7 @@ static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
                                 FF_BUFFER_HINTS_PRESERVE |
                                 FF_BUFFER_HINTS_REUSABLE;
 
-        if ((ret = avctx->get_buffer(avctx, &ctx->pic)) < 0) {
+        if ((ret = ff_get_buffer(avctx, &ctx->pic)) < 0) {
             av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
             return ret;
         }
index 77357fd2e28bd6434b01fb3544bc892fff02aaee..13a0d4c0781c5e5a4b08f0df0ec38e6cc0ec1b8e 100644 (file)
@@ -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);
                     }
index 1f7905819cfe9fc25f7197b3eadd191fe39f189e..b6aa6f5f82f9b47a841ef069199ad104abc3580e 100644 (file)
@@ -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;
     }
index 4f9f52558feafa3ce7d4052b85db0120d097868a..c8c683d11b9789e50d0f804f5e556ac2cccaddf0 100644 (file)
@@ -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;
     }
index a24a38ba80b484565046efa2e86415b8f1cc55a2..d6899cf52d18a0ffaaf94f79277c767eed9f64b0 100644 (file)
@@ -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;
     }
index 45e751b389d9422d61020f2a2367ad6789f0274c..a5c13960bde5901048acd9652a47b877921d64ff 100644 (file)
@@ -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;
     }
index a0affc98e8cb9b144a6d1d863c7d48fe7cf61d44..97d46ad94696fdf55e8c787eaf13ca672ee841cc 100644 (file)
@@ -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;
     }
index aaedeff187cdee7e79727c22e357bb1a77468385..0e3805bdb44985cec76dfb106e341da9032b4d67 100644 (file)
@@ -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;
                 }
index 6fdd3f932d39097165057fdf0c99f78afd6635da..6d2473831b1e01179c0f266353b958037b90eb56 100644 (file)
@@ -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;
     }
index bbf747fa35060593aff136deb3732b27284e0857..79995791d684b1008fdb717ae57f32df9ada111b 100644 (file)
@@ -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++) {
index 0496257fdee2a2994f0b09a4ce40f201eb99a9b0..73d9da3f1c35b609ee84e3babab130b644bb8a60 100644 (file)
@@ -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;
index e6835e6f4aa63cae49b3a23e423420340676a353..c9b356440997c76023673610eff9e69387fbee27 100644 (file)
@@ -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;
     }
index d0f41072fd3b59eb7afbf45702543a759d538899..b702175c19e5afc0e1024fc6930084c42aab384f 100644 (file)
@@ -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;
     }
index 1666242c376c4b20c8aeedcce3211af41b92fa47..269a051f69e0f2c0567129c4c1afacf15860db05 100644 (file)
@@ -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;
     }
index 934a1fca1b24b6c59ebeed90789c22b2fdcc7d9e..99692dc1709ade55c4e1224b02bdc047427f181a 100644 (file)
@@ -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;
     }
index 05f94b7e1a0155e3135b0c1604ed526d1fb69c19..2224e329668c7fd02b55cb3b127e15916ff0fdc1 100644 (file)
@@ -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;
index 0c6c7d3cfb0a9c01aa4373e591610f280c79221c..1a987fcbd465ab2458b79ab5685bd381c01a11c8 100644 (file)
@@ -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;
     }
index deaafd2d579e4132f8948eb628ead4d05b113369..8266673aec3f908a85312fa64aeb32b9f0c66871 100644 (file)
@@ -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;
     }
index c9c8080dd93baa8865277244b81dec64ae4bd672..580def318345a0d00bc175ba44f084aafac05ea1 100644 (file)
@@ -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;
     }
index 84434a29a1bc0ec02881b9b23e068bc1da415cda..9eea92a4eeda5ff534eb3bdd99c3099d88c10717 100644 (file)
@@ -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;
     }
index a5e0720889f8b93ddaf739084687d24bedaa2ec9..192f1eb6a39c3749458b0c873b83c150c3f3762e 100644 (file)
@@ -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;
         }
index 132c09493585e3c54cb74b519c9b4b4820dbe558..76fab59e9a755edd219ebacb0b5da2c8742d6cad 100644 (file)
@@ -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;
     }
index 412709cfd9f86a8d9272e59e828b18a6ba06d9bb..e7791b7e05cb17afdbeaa74c910e0b0d93088160 100644 (file)
@@ -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;
     }
index be2b8e20e921eba7dde92a485857c69957c97763..fad69b8d08ad9ec6ffadf69c8f281bf7dc762190 100644 (file)
@@ -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;
                 }
index 211396bc65124ef4096292b7b5122b94aa76974a..d482b0f068238ca81b6bf2c84877127af1dc859f 100644 (file)
@@ -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;
     }
index 61283e83fb6ef4e899e63deef01f9e777e194a60..0d11e9cd8213bb98ac815b8e5616841be2c1fed4 100644 (file)
@@ -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;
     }
index d69f452e5d4c7c12150667dc3ac76db4c5cbb132..fce45621c638e9c87b3b5c8f7ed06590765144c0 100644 (file)
@@ -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;
     }
index c4d290478ddf9e195ad82361f3ab2d5f1f55cf96..50c55425ab071d8e6d1d79cc41f3182c1781957b 100644 (file)
@@ -24,6 +24,7 @@
 #include "avcodec.h"
 #include "dsputil.h"
 #include "dwt.h"
+#include "internal.h"
 #include "snow.h"
 
 #include "rangecoder.h"
index 29f53302b02fc92829a704639c8469b9a9ff141c..e60cb6529781766937f32324d180a6c626364bb3 100644 (file)
@@ -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;
index a10f44964817947d1558f5e8324c8723be7accb3..310ac2c7b9bce10a5b89ddfe37877db7a4e4721e 100644 (file)
@@ -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;
     }
index 1e52e1cac135fd020baa2e3627ed17d0319a35dc..21531f636df046d1dc78e072533a00648c92182f 100644 (file)
@@ -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);
     }
 
index 96d18300ddaa6f108092fdb74752e4e63d0bd9b2..027275bd2cc011c716196065c082a49c396360a5 100644 (file)
@@ -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;
     }
index 7f018fc441b68b20602fc6985255ec556932f2b0..782c03cbcf962444ad2be48fe0653b6b1ca10abd 100644 (file)
@@ -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.
index 48ce5c1fada5418290018c9d145aa821d5c3379f..c42a65b9f4d29d31803c8bff031d6207a2d6bb66 100644 (file)
@@ -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;
     }
index 8533707f8ba91604cf88936e4252bd8404c8d667..c56635e72248e19f8d64fddf4b8393081119038d 100644 (file)
@@ -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;
     }
index 7ee155640ab226dd615863d11d75d31e31dd3d5b..66e3427b78608101bc52ad06d8954d610f6ed540 100644 (file)
@@ -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;
     }
index 6c40e6cfe72ac8dae2bc0ce0162ae09cf4297b5f..db2805ebafa0a3d375e43ea7ac120523902bf3dc 100644 (file)
@@ -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;
     }
index e6117488dc71b0ceef84e9c99238a880f2f25503..0bd7daba9c792e49d157c8de6de2cb6ce78f08d1 100644 (file)
@@ -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;
     }
index 072af7e067eaaf0f8d039e26908fccc4c0b73368..89894692376f10c3ac3550102edef6d2aba13f07 100644 (file)
@@ -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;
         }
index 67c8a093f7be7bd202b2b62b964968eadf0e2be3..8e2605f053ac731f73262e0bb9bc39372c1bf837 100644 (file)
@@ -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;
     }
index 06f4fc94e4e3479f601c2eb5b9479337886dfc46..4909fc4862a1f80f48b81fc21519725dd934158c 100644 (file)
@@ -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)
index aa08436d75d3722eeaafba37c2b589738dfeb414..29a93a8917a2c3434f3407525c7208c7dcf9e40b 100644 (file)
@@ -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];
index 4aad304260f676a81439fdd0b8e9ee895293f563..0b9753f733b66d494fd95c375ffbfc0d880ee9f6 100644 (file)
@@ -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];
index b96ba11fbd85aaa9eefc4059e4e54b4f3c95e878..1f44b417a6480d87e4daf242bbb20a02699b5f34 100644 (file)
@@ -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);
     }
index 13f965ddbefce18c520ac0476be2ef4f74cbc652..f5e15cdb18854ef332e243fde6c0ee419a44c6e3 100644 (file)
@@ -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;
     }
index 5dc274c13ccac069e29b7475cb1e5dcf085fb8ba..b761787ef08dbdfe6d3a708aa256dba3fc36e01d 100644 (file)
@@ -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);
     }
index 6bfba682d16accc1bd8743ddb364e35044ad8b77..5e3f96416bd002e0e742908082d3604d9fa75160 100644 (file)
@@ -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;
     }
index df5088c9b8a3e4b28d7163d9da076a469a5b8c17..1614dd306193dc7d2ad95ed7fe78bb3e03f66583 100644 (file)
@@ -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;
     }
index 2fdd27fdb0702b81caf02ac2ee57729df09caafc..14b512acb1812323d50e51b88ed918e491eeb443 100644 (file)
@@ -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;
     }
index 496d4c3f33bff66f7d4191bb973a24ac97b0b756..b30e614c2f4b8d6c576f38603952ea7c15fa2985 100644 (file)
@@ -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;
     }
index d67bdb6bc1d041598354e9cbf3e8fbe7690e88e4..c9490e770b687f940981f0f376782fa428f337b2 100644 (file)
@@ -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;
             }
index 32b094d44254f2e7225b6028af6e01492a83c4d4..e641a7583059da019bd22afa7cb0ae397ad7a820 100644 (file)
@@ -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;
     }
index a0ce4a3f646dc3f146f2495cbc8c7013e87d23bb..e8f34fa6320d99b831ceedbf643a35c70a3cf8a3 100644 (file)
@@ -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;
     }
index eb7fe7c25e9f9576ec3d89e2b5dbca98c8a92348..e2803bb2a32958365eb27c64d91d8362a21a47dd 100644 (file)
@@ -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;
     }
index bd930135a27d936100a47c4744ecb937e52cc419..a36c2c21c3ef81a9f662af47888f44ba8528c375 100644 (file)
@@ -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");
index ac0cce16bdcb8ff33acaed507c81554567921996..321c25d9f192817fb90ad5ebcd185a69632758d0 100644 (file)
@@ -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;
index 2ee235cffcff01ca6e37b4930715789848bb28e1..08d0600200d562e80de0a2cd530272db4a14e8a5 100644 (file)
@@ -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;
     }
index 3abbce26191f61349ea37eba838fd0e293a50ec4..3daac0b1607613a9a71926054afca22f1ff63c00 100644 (file)
@@ -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;
index 036316c4e32183662e992bbdc93e76758e51fd7c..62e0c6f656fff602d0679f081a1993a3562c38aa 100644 (file)
@@ -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;
     }
index e6bfc0da068bc604fba5f17d49c8d1c32f0bea2a..871bc13681ab86e3231581df56347fea85304f1d 100644 (file)
@@ -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;
     }
index b63315850c910e2db4045e0bb427dfdfa8a8e232..a8c392a7678c22f48bd532be45871e982dee934f 100644 (file)
@@ -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;
     }
index 4cec6152c5f519591225f8a38b63559aad1a0d5f..07d1e2ce5783ad9b8124fe388f7c6d248dde2ec8 100644 (file)
@@ -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;
     }
index f1ab5255fee2143fe8ec7c96686222339abf352b..0240a8cc9fcdd74fcc1efe244b63a987471505c0 100644 (file)
@@ -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;
index c6a9ba94a2d55f7fba64d8e80c859078c29f371a..e5edb5f0ede8ad0d072827108a8771315ac83c5d 100644 (file)
@@ -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);
     }
index 8fb1538514ae76d9307dd40d4933f0159c5e259a..33949ce25a2787475d400a363c0a8078d0782d8e 100644 (file)
@@ -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;
     }