summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-16 23:48:16 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-16 23:54:10 +0100
commit0ee905e243078cd4dfb3afa32777129aeee3bddb (patch)
tree78bafb0b5626836d18d158139b71d0e6b73780a2 /libavcodec
parent571a99de186eac69ed0d6b0eaaaa983cae30765a (diff)
parent5b9c3b4505206143d85398c1410949319fa1180f (diff)
downloadffmpeg-0ee905e243078cd4dfb3afa32777129aeee3bddb.tar.gz
Merge commit '5b9c3b4505206143d85398c1410949319fa1180f'
* commit '5b9c3b4505206143d85398c1410949319fa1180f': Replace all instances of avcodec_alloc_frame() with av_frame_alloc(). Conflicts: doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c libavcodec/alacenc.c libavcodec/libopenjpegenc.c libavcodec/libvpxenc.c libavcodec/pcm.c libavcodec/xbmenc.c libavcodec/xwdenc.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avuienc.c2
-rw-r--r--libavcodec/ffv1.c2
-rw-r--r--libavcodec/libopenjpegenc.c2
-rw-r--r--libavcodec/libtheoraenc.c2
-rw-r--r--libavcodec/libutvideodec.cpp2
-rw-r--r--libavcodec/libutvideoenc.cpp2
-rw-r--r--libavcodec/libvpxenc.c2
-rw-r--r--libavcodec/proresenc_anatoliy.c2
-rw-r--r--libavcodec/proresenc_kostya.c2
-rw-r--r--libavcodec/r210enc.c2
-rw-r--r--libavcodec/svq1dec.c2
-rw-r--r--libavcodec/utils.c2
-rw-r--r--libavcodec/utvideoenc.c2
-rw-r--r--libavcodec/v210enc.c2
-rw-r--r--libavcodec/v308enc.c2
-rw-r--r--libavcodec/v408enc.c2
-rw-r--r--libavcodec/v410enc.c2
-rw-r--r--libavcodec/xfaceenc.c2
-rw-r--r--libavcodec/y41penc.c2
-rw-r--r--libavcodec/yuv4enc.c2
20 files changed, 20 insertions, 20 deletions
diff --git a/libavcodec/avuienc.c b/libavcodec/avuienc.c
index 9276935649..eb0046cf5c 100644
--- a/libavcodec/avuienc.c
+++ b/libavcodec/avuienc.c
@@ -25,7 +25,7 @@
static av_cold int avui_encode_init(AVCodecContext *avctx)
{
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
if (avctx->width != 720 || avctx->height != 486 && avctx->height != 576) {
av_log(avctx, AV_LOG_ERROR, "Only 720x486 and 720x576 are supported.\n");
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 9f3206f92c..aefb70d602 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -49,7 +49,7 @@ av_cold int ffv1_common_init(AVCodecContext *avctx)
s->avctx = avctx;
s->flags = avctx->flags;
- s->picture.f = avcodec_alloc_frame();
+ s->picture.f = av_frame_alloc();
s->last_picture.f = av_frame_alloc();
if (!s->picture.f || !s->last_picture.f)
return AVERROR(ENOMEM);
diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index c7769f7a02..14579b68f3 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -242,7 +242,7 @@ static av_cold int libopenjpeg_encode_init(AVCodecContext *avctx)
goto fail;
}
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame) {
av_log(avctx, AV_LOG_ERROR, "Error allocating coded frame\n");
goto fail;
diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
index 9fa096fca7..5d27c6364f 100644
--- a/libavcodec/libtheoraenc.c
+++ b/libavcodec/libtheoraenc.c
@@ -264,7 +264,7 @@ static av_cold int encode_init(AVCodecContext* avc_context)
th_comment_clear(&t_comment);
/* Set up the output AVFrame */
- avc_context->coded_frame= avcodec_alloc_frame();
+ avc_context->coded_frame = av_frame_alloc();
return 0;
}
diff --git a/libavcodec/libutvideodec.cpp b/libavcodec/libutvideodec.cpp
index 0fae9f78f4..0d8fa1a7f6 100644
--- a/libavcodec/libutvideodec.cpp
+++ b/libavcodec/libutvideodec.cpp
@@ -96,7 +96,7 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx)
}
/* Allocate the output frame */
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
/* Ut Video only supports 8-bit */
avctx->bits_per_raw_sample = 8;
diff --git a/libavcodec/libutvideoenc.cpp b/libavcodec/libutvideoenc.cpp
index 44cd42f02b..ad70669a6b 100644
--- a/libavcodec/libutvideoenc.cpp
+++ b/libavcodec/libutvideoenc.cpp
@@ -74,7 +74,7 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx)
flags = ((avctx->prediction_method + 1) << 8) | (avctx->thread_count - 1);
avctx->priv_data = utv;
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
/* Alloc extradata buffer */
info = (UtVideoExtra *)av_malloc(sizeof(*info));
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 0c112e8da2..aa7f89e3cc 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -456,7 +456,7 @@ static av_cold int vpx_init(AVCodecContext *avctx,
vpx_img_wrap(&ctx->rawimg_alpha, VPX_IMG_FMT_I420, avctx->width, avctx->height, 1,
(unsigned char*)1);
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame) {
av_log(avctx, AV_LOG_ERROR, "Error allocating coded frame\n");
vp8_free(avctx);
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index e124b41bdd..80ce1359c5 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -581,7 +581,7 @@ static av_cold int prores_encode_init(AVCodecContext *avctx)
scale_mat(QMAT_CHROMA[avctx->profile], ctx->qmat_chroma[i - 1], i);
}
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
avctx->coded_frame->key_frame = 1;
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index 510b4084e2..71c2cb49f2 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -1073,7 +1073,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
int interlaced = !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT);
avctx->bits_per_raw_sample = 10;
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)
return AVERROR(ENOMEM);
diff --git a/libavcodec/r210enc.c b/libavcodec/r210enc.c
index 80230f5a5f..d61cd757e8 100644
--- a/libavcodec/r210enc.c
+++ b/libavcodec/r210enc.c
@@ -26,7 +26,7 @@
static av_cold int encode_init(AVCodecContext *avctx)
{
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)
return AVERROR(ENOMEM);
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index d62524dcae..1e7ab494a8 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -742,7 +742,7 @@ static av_cold int svq1_decode_init(AVCodecContext *avctx)
int i;
int offset = 0;
- s->prev = avcodec_alloc_frame();
+ s->prev = av_frame_alloc();
if (!s->prev)
return AVERROR(ENOMEM);
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index d52c96cb32..cf45607cc7 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1559,7 +1559,7 @@ static int pad_last_frame(AVCodecContext *s, AVFrame **dst, const AVFrame *src)
AVFrame *frame = NULL;
int ret;
- if (!(frame = avcodec_alloc_frame()))
+ if (!(frame = av_frame_alloc()))
return AVERROR(ENOMEM);
frame->format = src->format;
diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c
index c47ccd06fe..e5a858d5ae 100644
--- a/libavcodec/utvideoenc.c
+++ b/libavcodec/utvideoenc.c
@@ -126,7 +126,7 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx)
return AVERROR_OPTION_NOT_FOUND;
}
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame) {
av_log(avctx, AV_LOG_ERROR, "Could not allocate frame.\n");
diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c
index 51ec6ef57e..1e53bdbdda 100644
--- a/libavcodec/v210enc.c
+++ b/libavcodec/v210enc.c
@@ -36,7 +36,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_WARNING, "bits per raw sample: %d != 10-bit\n",
avctx->bits_per_raw_sample);
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)
return AVERROR(ENOMEM);
diff --git a/libavcodec/v308enc.c b/libavcodec/v308enc.c
index 7a97d5ad3a..c6c5ac5015 100644
--- a/libavcodec/v308enc.c
+++ b/libavcodec/v308enc.c
@@ -31,7 +31,7 @@ static av_cold int v308_encode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
}
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame) {
av_log(avctx, AV_LOG_ERROR, "Could not allocate frame.\n");
diff --git a/libavcodec/v408enc.c b/libavcodec/v408enc.c
index 85cf7c84eb..20f08c74ed 100644
--- a/libavcodec/v408enc.c
+++ b/libavcodec/v408enc.c
@@ -26,7 +26,7 @@
static av_cold int v408_encode_init(AVCodecContext *avctx)
{
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame) {
av_log(avctx, AV_LOG_ERROR, "Could not allocate frame.\n");
diff --git a/libavcodec/v410enc.c b/libavcodec/v410enc.c
index c4ce3dfd04..0e2e82a7f9 100644
--- a/libavcodec/v410enc.c
+++ b/libavcodec/v410enc.c
@@ -32,7 +32,7 @@ static av_cold int v410_encode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
}
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame) {
av_log(avctx, AV_LOG_ERROR, "Could not allocate frame.\n");
diff --git a/libavcodec/xfaceenc.c b/libavcodec/xfaceenc.c
index e737f6d9d5..e213c9d70a 100644
--- a/libavcodec/xfaceenc.c
+++ b/libavcodec/xfaceenc.c
@@ -125,7 +125,7 @@ static void encode_block(char *bitmap, int w, int h, int level, ProbRangesQueue
static av_cold int xface_encode_init(AVCodecContext *avctx)
{
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)
return AVERROR(ENOMEM);
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
diff --git a/libavcodec/y41penc.c b/libavcodec/y41penc.c
index 41666ccf33..8f67944adf 100644
--- a/libavcodec/y41penc.c
+++ b/libavcodec/y41penc.c
@@ -30,7 +30,7 @@ static av_cold int y41p_encode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
}
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
avctx->bits_per_coded_sample = 12;
if (!avctx->coded_frame) {
diff --git a/libavcodec/yuv4enc.c b/libavcodec/yuv4enc.c
index 8d3907bc7a..ed0fc776db 100644
--- a/libavcodec/yuv4enc.c
+++ b/libavcodec/yuv4enc.c
@@ -25,7 +25,7 @@
static av_cold int yuv4_encode_init(AVCodecContext *avctx)
{
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame) {
av_log(avctx, AV_LOG_ERROR, "Could not allocate frame.\n");