ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | Wed Apr 13 16:12:44 2022 +0200| [f6e167998f258dd69cd5e66e8bea52590bdec75a] | committer: Andreas Rheinhardt
avcodec/avcodec: Simplify accessing AVSubtitleRect via dedicated pointer Reviewed-by: Anton Khirnov <an...@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f6e167998f258dd69cd5e66e8bea52590bdec75a --- libavcodec/avcodec.c | 15 +++++++++------ 1 file 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]); } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".