# HG changeset patch # User michael # Date 1239568818 0 # Node ID 95f37e7d10cdac91fcad9dc0f39de3d08b1cd52d # Parent 8d228c29a33831f181f19774f92419139ab4f454 Get rid of the non sensical idea of using the current picture for missing reference pictures. diff -r 8d228c29a338 -r 95f37e7d10cd h264.c --- a/h264.c Sun Apr 12 20:21:23 2009 +0000 +++ b/h264.c Sun Apr 12 20:40:18 2009 +0000 @@ -2950,7 +2950,10 @@ for(index= 0; index < h->ref_count[list]; index++){ if(!h->ref_list[list][index].data[0]){ av_log(h->s.avctx, AV_LOG_ERROR, "Missing reference picture\n"); - h->ref_list[list][index]= s->current_picture; //FIXME this is not a sensible solution + if(h->default_ref_list[list][0].data[0]) + h->ref_list[list][index]= h->default_ref_list[list][0]; + else + return -1; } } }