changeset 7316:cf1b80029862 libavcodec

Simplify picture output code.
author michael
date Sat, 19 Jul 2008 11:11:48 +0000
parents c7db87e35cae
children c010b69e12eb
files h264.c
diffstat 1 files changed, 4 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Sat Jul 19 10:47:25 2008 +0000
+++ b/h264.c	Sat Jul 19 11:11:48 2008 +0000
@@ -7863,26 +7863,19 @@
                 s->avctx->has_b_frames++;
             }
 
-            if(out_of_order || pics > s->avctx->has_b_frames)
+            if(out_of_order || pics > s->avctx->has_b_frames){
                 out->reference &= ~DELAYED_PIC_REF;
-            if(pics <= s->avctx->has_b_frames || out_of_order)
-                out = NULL;
-
-            if(out_of_order || pics > s->avctx->has_b_frames){
                 for(i=out_idx; h->delayed_pic[i]; i++)
                     h->delayed_pic[i] = h->delayed_pic[i+1];
             }
-
-            if(out){
+            if(!out_of_order && pics > s->avctx->has_b_frames){
                 *data_size = sizeof(AVFrame);
 
                 h->outputed_poc = out->poc;
-            }
-
-            if(out)
                 *pict= *(AVFrame*)out;
-            else
+            }else{
                 av_log(avctx, AV_LOG_DEBUG, "no picture\n");
+            }
         }
     }