summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/avcodec.c')
-rw-r--r--libavcodec/avcodec.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index ded6b5b307..a07e3ef4d6 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -453,12 +453,15 @@ void avsubtitle_free(AVSubtitle *sub)
int i;
for (i = 0; i < sub->num_rects; i++) {
- av_freep(&sub->rects[i]->data[0]);
- av_freep(&sub->rects[i]->data[1]);
- av_freep(&sub->rects[i]->data[2]);
- av_freep(&sub->rects[i]->data[3]);
- av_freep(&sub->rects[i]->text);
- av_freep(&sub->rects[i]->ass);
+ AVSubtitleRect *const rect = sub->rects[i];
+
+ av_freep(&rect->data[0]);
+ av_freep(&rect->data[1]);
+ av_freep(&rect->data[2]);
+ av_freep(&rect->data[3]);
+ av_freep(&rect->text);
+ av_freep(&rect->ass);
+
av_freep(&sub->rects[i]);
}