changeset 1195:f7522f310c7e libavcodec

segfault fix
author michaelni
date Thu, 17 Apr 2003 19:53:36 +0000
parents 432d9a42a244
children 2e06398e4647
files raw.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
     }