corrected avcodec_alloc_frame error... thought I already had, though
This commit is contained in:
parent
0b26955b16
commit
b51fba84ef
@ -17,7 +17,7 @@ import (
|
|||||||
static int aacdec_new(aacdec_t *m, uint8_t *buf, int len) {
|
static int aacdec_new(aacdec_t *m, uint8_t *buf, int len) {
|
||||||
m->c = avcodec_find_decoder(CODEC_ID_AAC);
|
m->c = avcodec_find_decoder(CODEC_ID_AAC);
|
||||||
m->ctx = avcodec_alloc_context3(m->c);
|
m->ctx = avcodec_alloc_context3(m->c);
|
||||||
m->f = avcodec_alloc_frame();
|
m->f = av_frame_alloc();
|
||||||
m->ctx->extradata = buf;
|
m->ctx->extradata = buf;
|
||||||
m->ctx->extradata_size = len;
|
m->ctx->extradata_size = len;
|
||||||
m->ctx->debug = 0x3;
|
m->ctx->debug = 0x3;
|
||||||
|
@ -24,7 +24,7 @@ import (
|
|||||||
m->ctx->bit_rate = m->bitrate;
|
m->ctx->bit_rate = m->bitrate;
|
||||||
m->ctx->channels = m->channels;
|
m->ctx->channels = m->channels;
|
||||||
m->ctx->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
|
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);
|
int r = avcodec_open2(m->ctx, m->c, 0);
|
||||||
av_log(m->ctx, AV_LOG_DEBUG, "extra %d\n", m->ctx->extradata_size);
|
av_log(m->ctx, AV_LOG_DEBUG, "extra %d\n", m->ctx->extradata_size);
|
||||||
return r;
|
return r;
|
||||||
|
@ -16,7 +16,7 @@ import (
|
|||||||
static int h264dec_new(h264dec_t *h, uint8_t *data, int len) {
|
static int h264dec_new(h264dec_t *h, uint8_t *data, int len) {
|
||||||
h->c = avcodec_find_decoder(CODEC_ID_H264);
|
h->c = avcodec_find_decoder(CODEC_ID_H264);
|
||||||
h->ctx = avcodec_alloc_context3(h->c);
|
h->ctx = avcodec_alloc_context3(h->c);
|
||||||
h->f = avcodec_alloc_frame();
|
h->f = av_frame_alloc();
|
||||||
h->ctx->extradata = data;
|
h->ctx->extradata = data;
|
||||||
h->ctx->extradata_size = len;
|
h->ctx->extradata_size = len;
|
||||||
h->ctx->debug = 0x3;
|
h->ctx->debug = 0x3;
|
||||||
|
@ -32,7 +32,7 @@ import (
|
|||||||
m->ctx->bit_rate = m->bitrate;
|
m->ctx->bit_rate = m->bitrate;
|
||||||
m->ctx->pix_fmt = m->pixfmt;
|
m->ctx->pix_fmt = m->pixfmt;
|
||||||
m->ctx->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
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);
|
return avcodec_open2(m->ctx, m->c, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user