# HG changeset patch # User michaelni # Date 1050609216 0 # Node ID f7522f310c7ead6b9aab2fc468f89746554bd133 # Parent 432d9a42a244b9d73cf4eb97c60d165e535d8195 segfault fix diff -r 432d9a42a244 -r f7522f310c7e raw.c --- a/raw.c Wed Apr 16 20:04:20 2003 +0000 +++ b/raw.c Thu Apr 17 19:53:36 2003 +0000 @@ -52,6 +52,7 @@ unsigned char * buffer; /* block of memory for holding one frame */ unsigned char * p; /* current position in buffer */ int length; /* number of bytes in buffer */ + AVFrame pic; ///< AVCodecContext.coded_frame } RawVideoContext; @@ -67,6 +68,10 @@ context->buffer = av_malloc(context->length); context->p = context->buffer; + context->pic.pict_type= FF_I_TYPE; + context->pic.key_frame= 1; + avctx->coded_frame= &context->pic; + if (! context->buffer) { return -1; }