OSDN Git Service

avcodec/h264: reset list_count too in case of error in ff_set_ref_count()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 6 Jan 2014 15:15:40 +0000 (16:15 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 6 Jan 2014 15:17:45 +0000 (16:17 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264.c

index 4a16386..d613afa 100644 (file)
@@ -3409,6 +3409,7 @@ int ff_set_ref_count(H264Context *h)
         if (ref_count[0]-1 > max[0] || ref_count[1]-1 > max[1]){
             av_log(h->avctx, AV_LOG_ERROR, "reference overflow %u > %u or %u > %u\n", ref_count[0]-1, max[0], ref_count[1]-1, max[1]);
             h->ref_count[0] = h->ref_count[1] = 0;
+            h->list_count   = 0;
             return AVERROR_INVALIDDATA;
         }