Fixes: CID1551694 Use after free (false positive based on assuming that out == in and one is freed and one used)
Unified · Split
| @@ -288,7 +288,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 287 unmodified lines | |||
| 288 | const int width = s->planewidth[plane]; | 288 | const int width = s->planewidth[plane]; |
| 289 | 289 | ||
| 290 | if (!(s->planes & (1 << plane))) { | 290 | if (!(s->planes & (1 << plane))) { |
| 291 | if (out != in) | 291 | if (out->data[plane] != in->data[plane]) |
| 292 | av_image_copy_plane(out->data[plane], out->linesize[plane], | 292 | av_image_copy_plane(out->data[plane], out->linesize[plane], |
| 293 | in->data[plane], in->linesize[plane], | 293 | in->data[plane], in->linesize[plane], |
| 294 | width * ((s->depth + 7) / 8), height); | 294 | width * ((s->depth + 7) / 8), height); |