aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-02-14 11:44:33 +0100
committerAnton Khirnov <anton@khirnov.net>2013-03-02 10:27:13 +0100
commit437211ae73ef1ed8285b4fed7620502ea4999e11 (patch)
tree4ccb18c3d34a68beaf0c753e801497962397ba7d /libavcodec/h264.c
parent668e16a0dd1ff56d4beeff5c658d8a2a08dbfac8 (diff)
downloadffmpeg-437211ae73ef1ed8285b4fed7620502ea4999e11.tar.gz
h264: set ref_count to 0 for intra slices.
CC:libav-stable@libav.org
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 7d24df261e..e7186c847a 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3384,8 +3384,11 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
h->list_count = 2;
else
h->list_count = 1;
- } else
+ } else {
h->list_count = 0;
+ h->ref_count[0] = h->ref_count[1] = 0;
+ }
+
max_refs = h->picture_structure == PICT_FRAME ? 16 : 32;