--- libavcodec/h264.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 581848b..56b6c8e 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -4110,10 +4110,9 @@ int main(void){ PutBitContext pb; GetBitContext gb; DSPContext dsp; - AVCodecContext avctx; + AVCodecContext *avctx = avcodec_alloc_context3(NULL); - avctx.av_class = avcodec_get_class(); - dsputil_init(&dsp, &avctx); + dsputil_init(&dsp, avctx); init_put_bits(&pb, temp, SIZE); printf("testing unsigned exp golomb\n"); @@ -4163,6 +4162,7 @@ int main(void){ printf("Testing RBSP\n"); + av_free(avctx); return 0; } #endif /* TEST */ -- 1.7.1 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel