diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-07-19 11:11:48 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-07-19 11:11:48 +0000 |
commit | 3eaa6d0e56696e2735a27accf1e7459b1acd9a19 (patch) | |
tree | d072a524f34396ca9bf3871e70df6746c8e0514b | |
parent | 6b476f05e321f2eddb3f756a0d8d1c5bacb24ff5 (diff) | |
download | ffmpeg-3eaa6d0e56696e2735a27accf1e7459b1acd9a19.tar.gz |
Simplify picture output code.
Originally committed as revision 14298 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/h264.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index c4591c8e44..7e2b0581b3 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -7863,26 +7863,19 @@ static int decode_frame(AVCodecContext *avctx, 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){ + out->reference &= ~DELAYED_PIC_REF; 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"); + } } } |