Mercurial > libavcodec.hg
changeset 2713:16258de8ae06 libavcodec
fix crash on negative POC
author | lorenm |
---|---|
date | Thu, 19 May 2005 04:48:06 +0000 |
parents | 9c1a436dac6b |
children | b008c78467e6 |
files | h264.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/h264.c Thu May 19 02:43:21 2005 +0000 +++ b/h264.c Thu May 19 04:48:06 2005 +0000 @@ -3156,11 +3156,11 @@ if(h->slice_type==B_TYPE){ int out_i; - int limit= -1; + int limit= INT_MIN; /* sort frame according to poc in B slice */ for(out_i=0; out_i<h->short_ref_count; out_i++){ - int best_i=-1; + int best_i=INT_MIN; int best_poc=INT_MAX; for(i=0; i<h->short_ref_count; i++){ @@ -3171,7 +3171,7 @@ } } - assert(best_i != -1); + assert(best_i != INT_MIN); limit= best_poc; sorted_short_ref[out_i]= *h->short_ref[best_i];