]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/error_resilience.c
eamad: release the reference frame on video size changes
[ffmpeg] / libavcodec / error_resilience.c
index 3fb95ead88f8436704a97dae231e4bd0e1cd2f59..cf967bf2159eb7fb34c42847335a92e5c604cd41 100644 (file)
@@ -660,7 +660,7 @@ static int is_intra_more_likely(MpegEncContext *s){
 
     if(s->codec_id == CODEC_ID_H264){
         H264Context *h= (void*)s;
-        if (h->ref_count[0] <= 0 || !h->ref_list[0][0].f.data[0])
+        if (h->list_count <= 0 || h->ref_count[0] <= 0 || !h->ref_list[0][0].f.data[0])
             return 1;
     }