sws_freeContext have check the NULL pointer, so don't need to check NULL before sws_freeContext.
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -286,9 +286,7 @@ static av_cold void uninit(AVFilterContext *context) · 285 unmodified lines | ||
| 286 | 286 | } |
| 287 | 287 | |
| 288 | 288 | for (i = 0; i < 3; ++i){ |
| 289 | − if (sr_context->sws_contexts[i]){ | |
| 290 | − sws_freeContext(sr_context->sws_contexts[i]); | |
| 291 | − } | |
| 289 | + sws_freeContext(sr_context->sws_contexts[i]); | |
| 292 | 290 | } |
| 293 | 291 | } |
| 294 | 292 | |