avcodec/ivi: Fix indentation

Also improve readability by keeping a pointer to the IVIBandDesc that is
currently freed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
pull/362/head
Andreas Rheinhardt 4 years ago
parent aa2e0b868d
commit 3dacb09f10
  1. 26
      libavcodec/ivi.c

@ -268,18 +268,20 @@ static av_cold void ivi_free_buffers(IVIPlaneDesc *planes)
int p, b, t; int p, b, t;
for (p = 0; p < 3; p++) { for (p = 0; p < 3; p++) {
if (planes[p].bands) if (planes[p].bands) {
for (b = 0; b < planes[p].num_bands; b++) { for (b = 0; b < planes[p].num_bands; b++) {
av_freep(&planes[p].bands[b].bufs[0]); IVIBandDesc *band = &planes[p].bands[b];
av_freep(&planes[p].bands[b].bufs[1]); av_freep(&band->bufs[0]);
av_freep(&planes[p].bands[b].bufs[2]); av_freep(&band->bufs[1]);
av_freep(&planes[p].bands[b].bufs[3]); av_freep(&band->bufs[2]);
av_freep(&band->bufs[3]);
if (planes[p].bands[b].blk_vlc.cust_tab.table)
ff_free_vlc(&planes[p].bands[b].blk_vlc.cust_tab); if (band->blk_vlc.cust_tab.table)
for (t = 0; t < planes[p].bands[b].num_tiles; t++) ff_free_vlc(&band->blk_vlc.cust_tab);
av_freep(&planes[p].bands[b].tiles[t].mbs); for (t = 0; t < band->num_tiles; t++)
av_freep(&planes[p].bands[b].tiles); av_freep(&band->tiles[t].mbs);
av_freep(&band->tiles);
}
} }
av_freep(&planes[p].bands); av_freep(&planes[p].bands);
planes[p].num_bands = 0; planes[p].num_bands = 0;

Loading…
Cancel
Save