summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorLoren Merritt <lorenm@u.washington.edu>2005-05-19 04:48:06 +0000
committerLoren Merritt <lorenm@u.washington.edu>2005-05-19 04:48:06 +0000
commit29860cc88caaf1c4852e5ba18ea15e0516039c14 (patch)
treeb834da23173b5342a611cdf6ad2fa57e4bc55c20 /libavcodec/h264.c
parentd30769555feb0e739c4f6de75a9a938ec07b1ea1 (diff)
fix crash on negative POC
Originally committed as revision 4278 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 2386c20aeb..cf0580c7c5 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3156,11 +3156,11 @@ static int fill_default_ref_list(H264Context *h){
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 @@ static int fill_default_ref_list(H264Context *h){
}
}
- assert(best_i != -1);
+ assert(best_i != INT_MIN);
limit= best_poc;
sorted_short_ref[out_i]= *h->short_ref[best_i];