History

avcodec/avcodec: Simplify accessing AVSubtitleRect via dedicated pointer

Andreas Rheinhardt committed 4 years ago

Commit f6e16791 parent 36490511 file · +9 −6Browse files

Showing the changes to libavcodec/avcodec.c (1 of 1 file). Show all

Unified · Split

libavcodec/avcodec.c+9−6
@@ -453,12 +453,15 @@ void avsubtitle_free(AVSubtitle *sub) · 452 unmodified lines
453453 int i;
454454
455455 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+
462465 av_freep(&sub->rects[i]);
463466 }
464467

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t