From b51fba84ef40a430a37012b3f8682389c3ec7608 Mon Sep 17 00:00:00 2001 From: Paul Kohler Date: Thu, 10 Dec 2015 14:11:55 -0500 Subject: [PATCH] corrected avcodec_alloc_frame error... thought I already had, though --- aacdec.go | 2 +- aacenc.go | 2 +- h264dec.go | 2 +- h264enc.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aacdec.go b/aacdec.go index 7ddeedd..efa9653 100644 --- a/aacdec.go +++ b/aacdec.go @@ -17,7 +17,7 @@ import ( static int aacdec_new(aacdec_t *m, uint8_t *buf, int len) { m->c = avcodec_find_decoder(CODEC_ID_AAC); m->ctx = avcodec_alloc_context3(m->c); - m->f = avcodec_alloc_frame(); + m->f = av_frame_alloc(); m->ctx->extradata = buf; m->ctx->extradata_size = len; m->ctx->debug = 0x3; diff --git a/aacenc.go b/aacenc.go index 8386280..7ce6c21 100644 --- a/aacenc.go +++ b/aacenc.go @@ -24,7 +24,7 @@ import ( m->ctx->bit_rate = m->bitrate; m->ctx->channels = m->channels; m->ctx->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL; - m->f = avcodec_alloc_frame(); + m->f = av_frame_alloc(); int r = avcodec_open2(m->ctx, m->c, 0); av_log(m->ctx, AV_LOG_DEBUG, "extra %d\n", m->ctx->extradata_size); return r; diff --git a/h264dec.go b/h264dec.go index 745f339..747051a 100644 --- a/h264dec.go +++ b/h264dec.go @@ -16,7 +16,7 @@ import ( static int h264dec_new(h264dec_t *h, uint8_t *data, int len) { h->c = avcodec_find_decoder(CODEC_ID_H264); h->ctx = avcodec_alloc_context3(h->c); - h->f = avcodec_alloc_frame(); + h->f = av_frame_alloc(); h->ctx->extradata = data; h->ctx->extradata_size = len; h->ctx->debug = 0x3; diff --git a/h264enc.go b/h264enc.go index 92fe349..21bdb9f 100644 --- a/h264enc.go +++ b/h264enc.go @@ -32,7 +32,7 @@ import ( m->ctx->bit_rate = m->bitrate; m->ctx->pix_fmt = m->pixfmt; m->ctx->flags |= CODEC_FLAG_GLOBAL_HEADER; - m->f = avcodec_alloc_frame(); + m->f = av_frame_alloc(); return avcodec_open2(m->ctx, m->c, NULL); }