diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-09-25 14:29:35 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-09-25 14:29:35 +0000 |
commit | 07dff5c7a421b346a23c685259eb6e88abacb5d3 (patch) | |
tree | eb550fcb82a694249e9eb5a58f91f4bb912cc6f6 | |
parent | 49573a87c93988807d8610cf5ff57e35ca07e8d0 (diff) | |
download | ffmpeg-07dff5c7a421b346a23c685259eb6e88abacb5d3.tar.gz |
Initialize next/last_picture* as the generic code does not always
set them to sane values.
Originally committed as revision 15412 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/h264.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index d6751925a9..d2daba1f66 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3925,6 +3925,15 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ 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); |