comparison h264.c @ 2255:507690ff49a2 libavcodec

assertion when playing AVC/H.264 streams fix by (Loren Merritt <lorenm at u dot washington dot edu>)
author michael
date Sat, 25 Sep 2004 10:06:31 +0000
parents 0dfe4e32b19c
children cd43603c46f9
comparison
equal deleted inserted replaced
2254:0dfe4e32b19c 2255:507690ff49a2
2529 int out_i; 2529 int out_i;
2530 int limit= -1; 2530 int limit= -1;
2531 2531
2532 for(out_i=0; out_i<h->short_ref_count; out_i++){ 2532 for(out_i=0; out_i<h->short_ref_count; out_i++){
2533 int best_i=-1; 2533 int best_i=-1;
2534 int best_poc=-1; 2534 int best_poc=INT_MAX;
2535 2535
2536 for(i=0; i<h->short_ref_count; i++){ 2536 for(i=0; i<h->short_ref_count; i++){
2537 const int poc= h->short_ref[i]->poc; 2537 const int poc= h->short_ref[i]->poc;
2538 if(poc > limit && poc < best_poc){ 2538 if(poc > limit && poc < best_poc){
2539 best_poc= poc; 2539 best_poc= poc;
2897 2897
2898 if(opcode > MMCO_LONG){ 2898 if(opcode > MMCO_LONG){
2899 av_log(h->s.avctx, AV_LOG_ERROR, "illegal memory management control operation %d\n", opcode); 2899 av_log(h->s.avctx, AV_LOG_ERROR, "illegal memory management control operation %d\n", opcode);
2900 return -1; 2900 return -1;
2901 } 2901 }
2902 if(opcode == MMCO_END)
2903 break;
2902 } 2904 }
2903 h->mmco_index= i; 2905 h->mmco_index= i;
2904 }else{ 2906 }else{
2905 assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count); 2907 assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count);
2906 2908