allow av_parser_close(NULL)
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 26 May 2008 01:58:47 +0000 (01:58 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 26 May 2008 01:58:47 +0000 (01:58 +0000)
fixes issue300

Originally committed as revision 13410 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/parser.c

index 20f0031..a1e5c00 100644 (file)
@@ -214,10 +214,12 @@ int av_parser_change(AVCodecParserContext *s,
 
 void av_parser_close(AVCodecParserContext *s)
 {
+    if(s){
     if (s->parser->parser_close)
         s->parser->parser_close(s);
     av_free(s->priv_data);
     av_free(s);
+    }
 }
 
 /*****************************************************/