diff options
author | Måns Rullgård <mans@mansr.com> | 2010-08-06 22:25:36 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2010-08-06 22:25:36 +0000 |
commit | 0bb7408e557f5d5ee3f8c1d001012e5c204c20b4 (patch) | |
tree | a4e770b624cd2b20965a70168a0da47611f289a8 /libavfilter | |
parent | f3b90d25ee43965e72577bcdf406af4c90b35bea (diff) | |
download | ffmpeg-0bb7408e557f5d5ee3f8c1d001012e5c204c20b4.tar.gz |
avfilter: do not crash on null link src/dst in avfilter_destroy()
Originally committed as revision 24719 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avfilter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index d4ce97792d..02cdb56a05 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -429,6 +429,7 @@ void avfilter_destroy(AVFilterContext *filter) for(i = 0; i < filter->input_count; i ++) { if(filter->inputs[i]) { + if (filter->inputs[i]->src) filter->inputs[i]->src->outputs[filter->inputs[i]->srcpad] = NULL; avfilter_formats_unref(&filter->inputs[i]->in_formats); avfilter_formats_unref(&filter->inputs[i]->out_formats); @@ -437,6 +438,7 @@ void avfilter_destroy(AVFilterContext *filter) } for(i = 0; i < filter->output_count; i ++) { if(filter->outputs[i]) { + if (filter->outputs[i]->dst) filter->outputs[i]->dst->inputs[filter->outputs[i]->dstpad] = NULL; avfilter_formats_unref(&filter->outputs[i]->in_formats); avfilter_formats_unref(&filter->outputs[i]->out_formats); |