diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-07 10:53:20 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-07 10:54:39 +0200 |
commit | 1aeddc3cbfe7fd668a3580af6517cb605a006874 (patch) | |
tree | e325859a441075a3aa9bfc57e4a67be5398be629 /libavcodec/kmvc.c | |
parent | dc2a13aa802fc691c25d5e0194818831058316ee (diff) | |
parent | 8f689770548c86151071ef976cf9b6998ba21c2a (diff) | |
download | ffmpeg-1aeddc3cbfe7fd668a3580af6517cb605a006874.tar.gz |
Merge commit '8f689770548c86151071ef976cf9b6998ba21c2a'
* commit '8f689770548c86151071ef976cf9b6998ba21c2a':
kmvc: use fixed sized arrays in the context
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/kmvc.c')
-rw-r--r-- | libavcodec/kmvc.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c index 20aae67096..678554c5aa 100644 --- a/libavcodec/kmvc.c +++ b/libavcodec/kmvc.c @@ -46,7 +46,7 @@ typedef struct KmvcContext { int palsize; uint32_t pal[MAX_PALSIZE]; uint8_t *cur, *prev; - uint8_t *frm0, *frm1; + uint8_t frm0[320 * 200], frm1[320 * 200]; GetByteContext g; } KmvcContext; @@ -378,8 +378,6 @@ static av_cold int decode_init(AVCodecContext * avctx) return AVERROR(EINVAL); } - c->frm0 = av_mallocz(320 * 200); - c->frm1 = av_mallocz(320 * 200); c->cur = c->frm0; c->prev = c->frm1; @@ -414,28 +412,12 @@ static av_cold int decode_init(AVCodecContext * avctx) return 0; } - - -/* - * Uninit kmvc decoder - */ -static av_cold int decode_end(AVCodecContext * avctx) -{ - KmvcContext *const c = avctx->priv_data; - - av_freep(&c->frm0); - av_freep(&c->frm1); - - return 0; -} - AVCodec ff_kmvc_decoder = { .name = "kmvc", .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_KMVC, .priv_data_size = sizeof(KmvcContext), .init = decode_init, - .close = decode_end, .decode = decode_frame, .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Karl Morton's video codec"), |