| 411 | } |
| 412 | |
| 413 | void avsubtitle_free(AVSubtitle *sub) |
| 414 | { |
| 415 | int i; |
| 416 | |
| 417 | for (i = 0; i < sub->num_rects; i++) { |
| 418 | AVSubtitleRect *const rect = sub->rects[i]; |
| 419 | |
| 420 | av_freep(&rect->data[0]); |
| 421 | av_freep(&rect->data[1]); |
| 422 | av_freep(&rect->data[2]); |
| 423 | av_freep(&rect->data[3]); |
| 424 | av_freep(&rect->text); |
| 425 | av_freep(&rect->ass); |
| 426 | |
| 427 | av_freep(&sub->rects[i]); |
| 428 | } |
| 429 | |
| 430 | av_freep(&sub->rects); |
| 431 | |
| 432 | memset(sub, 0, sizeof(*sub)); |
| 433 | } |
| 434 | |
| 435 | av_cold void ff_codec_close(AVCodecContext *avctx) |
| 436 | { |
no test coverage detected