aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-05-26 01:58:47 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-05-26 01:58:47 +0000
commit99c1c3887d67b73e739574e745a36d29d818339d (patch)
treecff7da48509e4ed39650d0b0634700ca9ece6d43
parent4806b9226cbb72a7acb365fe93ccbb3c4ddcfe02 (diff)
downloadffmpeg-99c1c3887d67b73e739574e745a36d29d818339d.tar.gz
allow av_parser_close(NULL)
fixes issue300 Originally committed as revision 13410 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index 20f0031780..a1e5c00f24 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -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);
+ }
}
/*****************************************************/