summaryrefslogtreecommitdiff
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-03-21 16:25:29 +0100
committerAnton Khirnov <anton@khirnov.net>2016-04-24 10:06:23 +0200
commite9f884416c76558098fc1f63825b293956e8483c (patch)
tree27ea383fb49da781dfca689623c5d3a4ddb07645 /libavcodec/h264_slice.c
parent8d0cc8ca97678f4ca87948ebabcbaab5a4f4c1f6 (diff)
h264: move reading direct_spatial_mv_pred out of ff_set_ref_count()
It has nothing to do with the reference count and so does not belong in this function.
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 23824db888..d2c1f13f51 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1454,6 +1454,9 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
if (h->pps.redundant_pic_cnt_present)
sl->redundant_pic_count = get_ue_golomb(&sl->gb);
+ if (sl->slice_type_nos == AV_PICTURE_TYPE_B)
+ sl->direct_spatial_mv_pred = get_bits1(&sl->gb);
+
ret = ff_set_ref_count(h, sl);
if (ret < 0)
return ret;