allow av_parser_close(NULL)

fixes issue300

Originally committed as revision 13410 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2008-05-26 01:58:47 +00:00
parent 4806b9226c
commit 99c1c3887d
1 changed files with 2 additions and 0 deletions

View 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);
}
}
/*****************************************************/