Showing the changes to libavcodec/avcodec.c (1 of 1 file). Show all
Unified · Split
| @@ -453,12 +453,15 @@ void avsubtitle_free(AVSubtitle *sub) · 452 unmodified lines | ||
| 453 | 453 | int i; |
| 454 | 454 | |
| 455 | 455 | for (i = 0; i < sub->num_rects; i++) { |
| 456 | − av_freep(&sub->rects[i]->data[0]); | |
| 457 | − av_freep(&sub->rects[i]->data[1]); | |
| 458 | − av_freep(&sub->rects[i]->data[2]); | |
| 459 | − av_freep(&sub->rects[i]->data[3]); | |
| 460 | − av_freep(&sub->rects[i]->text); | |
| 461 | − av_freep(&sub->rects[i]->ass); | |
| 456 | + AVSubtitleRect *const rect = sub->rects[i]; | |
| 457 | + | |
| 458 | + av_freep(&rect->data[0]); | |
| 459 | + av_freep(&rect->data[1]); | |
| 460 | + av_freep(&rect->data[2]); | |
| 461 | + av_freep(&rect->data[3]); | |
| 462 | + av_freep(&rect->text); | |
| 463 | + av_freep(&rect->ass); | |
| 464 | + | |
| 462 | 465 | av_freep(&sub->rects[i]); |
| 463 | 466 | } |
| 464 | 467 | |