---
libavcodec/h264_slice.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 2e95879..0c38121 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1347,9 +1347,6 @@ static int h264_slice_header_parse(H264Context *h,
H264SliceContext *sl)
sl->ref_count[1] = sl->ref_count[0] = 0;
return ret;
}
- ret = ff_h264_build_ref_list(h, sl);
- if (ret < 0)
- return ret;
}
sl->pwt.use_weight = 0;
@@ -1449,6 +1446,10 @@ int ff_h264_decode_slice_header(H264Context *h,
H264SliceContext *sl)
if (ret < 0)
return ret;
+ ret = ff_h264_build_ref_list(h, sl);
+ if (ret < 0)
+ return ret;
+
if (h->ps.pps->weighted_bipred_idc == 2 &&
sl->slice_type_nos == AV_PICTURE_TYPE_B) {
implicit_weight_table(h, sl, -1);
--
2.0.0
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel