Mercurial > libavcodec.hg
changeset 7921:44570b9b3aa1 libavcodec
Initialize next/last_picture* as the generic code does not always
set them to sane values.
author | michael |
---|---|
date | Thu, 25 Sep 2008 14:29:35 +0000 |
parents | b731ef917a01 |
children | ed0ebbb168b6 |
files | h264.c |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/h264.c Thu Sep 25 12:04:25 2008 +0000 +++ b/h264.c Thu Sep 25 14:29:35 2008 +0000 @@ -3925,6 +3925,15 @@ if(h->slice_type_nos!=FF_I_TYPE && decode_ref_pic_list_reordering(h) < 0) return -1; + if(h->slice_type_nos!=FF_I_TYPE){ + s->last_picture_ptr= &h->ref_list[0][0]; + copy_picture(&s->last_picture, s->last_picture_ptr); + } + if(h->slice_type_nos==FF_B_TYPE){ + s->next_picture_ptr= &h->ref_list[1][0]; + copy_picture(&s->next_picture, s->next_picture_ptr); + } + if( (h->pps.weighted_pred && h->slice_type_nos == FF_P_TYPE ) || (h->pps.weighted_bipred_idc==1 && h->slice_type_nos== FF_B_TYPE ) ) pred_weight_table(h);