changeset 9418:95f37e7d10cd libavcodec

Get rid of the non sensical idea of using the current picture for missing reference pictures.
author michael
date Sun, 12 Apr 2009 20:40:18 +0000
parents 8d228c29a338
children f2f83796f07b
files h264.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
             }
         }
     }