# HG changeset patch # User michael # Date 1269982006 0 # Node ID 53822d92c3f7f0ff6ac1571ceffb2437bd237647 # Parent b94e1810ce4c78f4b53667705c7a35b4759a58ea Make sure the EC code does not attempt to use inter based concealment if there is no reference frame available. (this can happen because the EC code will attempt to use reference frames even for I/IDR frames) diff -r b94e1810ce4c -r 53822d92c3f7 error_resilience.c --- a/error_resilience.c Tue Mar 30 15:50:57 2010 +0000 +++ b/error_resilience.c Tue Mar 30 20:46:46 2010 +0000 @@ -629,6 +629,12 @@ undamaged_count++; } + if(s->codec_id == CODEC_ID_H264){ + H264Context *h= (void*)s; + if(h->ref_count[0] <= 0 || !h->ref_list[0][0].data[0]) + return 1; + } + if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction //prevent dsp.sad() check, that requires access to the image