# HG changeset patch # User romansh # Date 1076446089 0 # Node ID fac680cf3008a8454e15d4917db0e39ba1106c07 # Parent 7186712b391e60ccb0cba4e67f05126936900956 * gotta setup coded_frame for encoding. avcodec.h says that for decoding lavc is supposed to set it up as well and I don't think I see any reason not to. diff -r 7186712b391e -r fac680cf3008 g726.c --- a/g726.c Mon Feb 09 15:23:35 2004 +0000 +++ b/g726.c Tue Feb 10 20:48:09 2004 +0000 @@ -334,6 +334,17 @@ c->bit_buffer = 0; c->bits_left = 0; + avctx->coded_frame = avcodec_alloc_frame(); + if (!avctx->coded_frame) + return -ENOMEM; + avctx->coded_frame->key_frame = 1; + + return 0; +} + +static int g726_close(AVCodecContext *avctx) +{ + av_freep(&avctx->coded_frame); return 0; } @@ -394,7 +405,7 @@ sizeof(AVG726Context), g726_init, g726_encode_frame, - NULL, + g726_close, NULL, }; #endif //CONFIG_ENCODERS @@ -406,6 +417,6 @@ sizeof(AVG726Context), g726_init, NULL, - NULL, + g726_close, g726_decode_frame, };