mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 19:59:46 +00:00
avfilter: do not crash on null link src/dst in avfilter_destroy()
Originally committed as revision 24719 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
f3b90d25ee
commit
0bb7408e55
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user