for(i=0; i<h->long_ref_count; i++){ h->long_ref[i]->reference=0; CHECK_DELAY(h->long_ref[i]); h->long_ref[i]= NULL;
for(i=0; i<16; i++){ if (h->long_ref[i] != NULL) { h->long_ref[i]->reference=0; CHECK_DELAY(h->long_ref[i]); h->long_ref[i]= NULL; }
static void idr(H264Context *h){    int i,j;#define CHECK_DELAY(pic) \    for(j = 0; h->delayed_pic[j]; j++) \        if(pic == h->delayed_pic[j]){ \            pic->reference=1; \            break; \        }    for(i=0; i<h->long_ref_count; i++){        h->long_ref[i]->reference=0;        CHECK_DELAY(h->long_ref[i]);        h->long_ref[i]= NULL;    }    h->long_ref_count=0;    for(i=0; i<h->short_ref_count; i++){        h->short_ref[i]->reference=0;        CHECK_DELAY(h->short_ref[i]);        h->short_ref[i]= NULL;    }    h->short_ref_count=0;}