diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-04-17 19:53:36 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-04-17 19:53:36 +0000 |
commit | 9534223539bb4fc9f47537017e78d356379bec29 (patch) | |
tree | 3c921acbba920890f4bce4ec8d5436ac7e8317f7 /libavcodec/raw.c | |
parent | c9b99ea661656519981493e34ae4b55bf13a044b (diff) | |
download | ffmpeg-9534223539bb4fc9f47537017e78d356379bec29.tar.gz |
segfault fix
Originally committed as revision 1784 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/raw.c')
-rw-r--r-- | libavcodec/raw.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/raw.c b/libavcodec/raw.c index fd70cc9782..86591aae46 100644 --- a/libavcodec/raw.c +++ b/libavcodec/raw.c @@ -52,6 +52,7 @@ typedef struct RawVideoContext { 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 @@ static int raw_init(AVCodecContext *avctx) 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; } |