AVFrame *filtered_frame = NULL;
int frame_size, ret;
- if (!ost->filtered_frame && !(ost->filtered_frame = avcodec_alloc_frame())) {
+ if (!ost->filtered_frame && !(ost->filtered_frame = av_frame_alloc())) {
return AVERROR(ENOMEM);
} else
avcodec_get_frame_defaults(ost->filtered_frame);
AVCodecContext *avctx = ist->st->codec;
int i, ret, err = 0, resample_changed;
- if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame()))
+ if (!ist->decoded_frame && !(ist->decoded_frame = av_frame_alloc()))
return AVERROR(ENOMEM);
if (!ist->filter_frame && !(ist->filter_frame = av_frame_alloc()))
return AVERROR(ENOMEM);
int resample_changed, audio_resample;
if (!is->frame) {
- if (!(is->frame = avcodec_alloc_frame()))
+ if (!(is->frame = av_frame_alloc()))
return AVERROR(ENOMEM);
} else
avcodec_get_frame_defaults(is->frame);
goto error;
}
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame) {
ret = AVERROR(ENOMEM);
goto error;
}
/* frame containing input raw audio */
- frame = avcodec_alloc_frame();
+ frame = av_frame_alloc();
if (!frame) {
fprintf(stderr, "could not allocate audio frame\n");
exit(1);
int got_frame = 0;
if (!decoded_frame) {
- if (!(decoded_frame = avcodec_alloc_frame())) {
+ if (!(decoded_frame = av_frame_alloc())) {
fprintf(stderr, "out of memory\n");
exit(1);
}
}
c = avcodec_alloc_context3(codec);
- picture= avcodec_alloc_frame();
+ picture = av_frame_alloc();
/* put sample parameters */
c->bit_rate = 400000;
}
c = avcodec_alloc_context3(codec);
- picture= avcodec_alloc_frame();
+ picture = av_frame_alloc();
if(codec->capabilities&CODEC_CAP_TRUNCATED)
c->flags|= CODEC_FLAG_TRUNCATED; /* we do not send complete frames */
return AVERROR(ENOMEM);
}
- 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;
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;
}
vpx_img_wrap(&ctx->rawimg, 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);
avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id);
avctx->block_align = avctx->channels * avctx->bits_per_coded_sample / 8;
avctx->bit_rate = avctx->block_align * avctx->sample_rate * 8;
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)
return AVERROR(ENOMEM);
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);
int i;
int offset = 0;
- s->prev = avcodec_alloc_frame();
+ s->prev = av_frame_alloc();
if (!s->prev)
return AVERROR(ENOMEM);
AVFrame *frame = NULL;
int ret;
- if (!(frame = avcodec_alloc_frame()))
+ if (!(frame = av_frame_alloc()))
return AVERROR(ENOMEM);
frame->format = src->format;
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");
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);
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");
static av_cold int xbm_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;
static av_cold int xwd_encode_init(AVCodecContext *avctx)
{
- avctx->coded_frame = avcodec_alloc_frame();
+ avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)
return AVERROR(ENOMEM);
{
AVCodecContext *c;
AVPacket pkt = { 0 }; // data and size must be 0;
- AVFrame *frame = avcodec_alloc_frame();
+ AVFrame *frame = av_frame_alloc();
int got_packet;
av_init_packet(&pkt);
uint8_t *picture_buf;
int size;
- picture = avcodec_alloc_frame();
+ picture = av_frame_alloc();
if (!picture)
return NULL;
size = avpicture_get_size(pix_fmt, width, height);
{
const AVCodec *codec;
int got_picture = 1, ret = 0;
- AVFrame *frame = avcodec_alloc_frame();
+ AVFrame *frame = av_frame_alloc();
AVPacket pkt = *avpkt;
if (!frame)