diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-02-21 21:16:07 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-02-21 21:16:07 +0000 |
commit | 97bbb8851bf25f5a42cb0ecd7c8ca997563e8f1f (patch) | |
tree | 8d26a41d8ae5c4efd13508ec04a6d782b781d337 /libavcodec/h264.c | |
parent | 57177f648d005b5741bdeb9c5f30481b614fe014 (diff) | |
download | ffmpeg-97bbb8851bf25f5a42cb0ecd7c8ca997563e8f1f.tar.gz |
output delayed frames
fixes:
CANL4_SVA_B.264
NL3_SVA_C.264
NL3_SVA_E.264
Originally committed as revision 8055 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index c66c9c7a17..c87707d65b 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -8244,6 +8244,26 @@ static int decode_frame(AVCodecContext *avctx, /* no supplementary picture */ if (buf_size == 0) { + Picture *out; + int i, out_idx; + +//FIXME factorize this with the output code below + out = h->delayed_pic[0]; + out_idx = 0; + for(i=1; h->delayed_pic[i] && !h->delayed_pic[i]->key_frame; i++) + if(h->delayed_pic[i]->poc < out->poc){ + out = h->delayed_pic[i]; + out_idx = i; + } + + for(i=out_idx; h->delayed_pic[i]; i++) + h->delayed_pic[i] = h->delayed_pic[i+1]; + + if(out){ + *data_size = sizeof(AVFrame); + *pict= *(AVFrame*)out; + } + return 0; } |