[libav-commits] h264-test: Initialize AVCodecContext.av_class.

Diego Biurrun git at libav.org
Sat Jan 7 22:22:37 CET 2012


Module: libav
Branch: master
Commit: a7e3cb9d32366209015a395f1435323887e66d4f

Author:    Diego Biurrun <diego at biurrun.de>
Committer: Diego Biurrun <diego at biurrun.de>
Date:      Sat Jan  7 21:36:31 2012 +0100

h264-test: Initialize AVCodecContext.av_class.

This fixes a segfault on startup.

Also remove a commented-out and completely unused variable.

---

 libavcodec/h264.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 82b7acd..cee16e7 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -4109,10 +4109,10 @@ int main(void){
     uint8_t temp[SIZE];
     PutBitContext pb;
     GetBitContext gb;
-//    int int_temp[10000];
     DSPContext dsp;
     AVCodecContext avctx;
 
+    avctx.av_class = avcodec_get_class();
     dsputil_init(&dsp, &avctx);
 
     init_put_bits(&pb, temp, SIZE);



More information about the libav-commits mailing list