comparison h264.c @ 2484:a3188eb4266c libavcodec

correct long term picture management patch by (Loic <lll+ffmpeg m4x org>) fixes decoding of MR2_MW_A.264
author michael
date Tue, 01 Feb 2005 11:12:53 +0000
parents 805431763e84
children 2844b8cf4e11
comparison
equal deleted inserted replaced
2483:4eb9d61cad4e 2484:a3188eb4266c
3148 if(pic == h->delayed_pic[j]){ \ 3148 if(pic == h->delayed_pic[j]){ \
3149 pic->reference=1; \ 3149 pic->reference=1; \
3150 break; \ 3150 break; \
3151 } 3151 }
3152 3152
3153 for(i=0; i<h->long_ref_count; i++){ 3153 for(i=0; i<16; i++){
3154 h->long_ref[i]->reference=0; 3154 if (h->long_ref[i] != NULL) {
3155 CHECK_DELAY(h->long_ref[i]); 3155 h->long_ref[i]->reference=0;
3156 h->long_ref[i]= NULL; 3156 CHECK_DELAY(h->long_ref[i]);
3157 h->long_ref[i]= NULL;
3158 }
3157 } 3159 }
3158 h->long_ref_count=0; 3160 h->long_ref_count=0;
3159 3161
3160 for(i=0; i<h->short_ref_count; i++){ 3162 for(i=0; i<h->short_ref_count; i++){
3161 h->short_ref[i]->reference=0; 3163 h->short_ref[i]->reference=0;
3261 pic= remove_long(h, mmco[i].long_index); 3263 pic= remove_long(h, mmco[i].long_index);
3262 if(pic) pic->reference=0; 3264 if(pic) pic->reference=0;
3263 3265
3264 h->long_ref[ mmco[i].long_index ]= remove_short(h, mmco[i].short_frame_num); 3266 h->long_ref[ mmco[i].long_index ]= remove_short(h, mmco[i].short_frame_num);
3265 h->long_ref[ mmco[i].long_index ]->long_ref=1; 3267 h->long_ref[ mmco[i].long_index ]->long_ref=1;
3268 h->long_ref_count++;
3266 break; 3269 break;
3267 case MMCO_LONG2UNUSED: 3270 case MMCO_LONG2UNUSED:
3268 pic= remove_long(h, mmco[i].long_index); 3271 pic= remove_long(h, mmco[i].long_index);
3269 if(pic==NULL) return -1; 3272 if(pic==NULL) return -1;
3270 pic->reference= 0; 3273 pic->reference= 0;