Browse Source

h264: reset h->ref_count in case of errors in ff_h264_decode_ref_pic_list_reordering()

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
tags/n0.9
Laurent Aimar Janne Grunau 14 years ago
parent
commit
4c7a232fc8
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavcodec/h264.c

+ 3
- 1
libavcodec/h264.c View File

@@ -2857,8 +2857,10 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
ff_h264_fill_default_ref_list(h); ff_h264_fill_default_ref_list(h);
} }


if(h->slice_type_nos!=AV_PICTURE_TYPE_I && ff_h264_decode_ref_pic_list_reordering(h) < 0)
if(h->slice_type_nos!=AV_PICTURE_TYPE_I && ff_h264_decode_ref_pic_list_reordering(h) < 0) {
h->ref_count[1]= h->ref_count[0]= 0;
return -1; return -1;
}


if(h->slice_type_nos!=AV_PICTURE_TYPE_I){ if(h->slice_type_nos!=AV_PICTURE_TYPE_I){
s->last_picture_ptr= &h->ref_list[0][0]; s->last_picture_ptr= &h->ref_list[0][0];


Loading…
Cancel
Save