h264-test: Initialize AVCodecContext.av_class.
authorDiego Biurrun <diego@biurrun.de>
Sat, 7 Jan 2012 20:36:31 +0000 (21:36 +0100)
committerDiego Biurrun <diego@biurrun.de>
Sat, 7 Jan 2012 21:13:10 +0000 (22:13 +0100)
This fixes a segfault on startup.

Also remove a commented-out and completely unused variable.

libavcodec/h264.c

index 82b7acd..cee16e7 100644 (file)
@@ -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);