Mercurial > libavcodec.hg
changeset 4556:c140a3360e18 libavcodec
output delayed frames
fixes:
CANL4_SVA_B.264
NL3_SVA_C.264
NL3_SVA_E.264
author | michael |
---|---|
date | Wed, 21 Feb 2007 21:16:07 +0000 |
parents | 8d1303d3777d |
children | 6d4ac79304da |
files | h264.c |
diffstat | 1 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/h264.c Wed Feb 21 19:19:46 2007 +0000 +++ b/h264.c Wed Feb 21 21:16:07 2007 +0000 @@ -8244,6 +8244,26 @@ /* 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; }