aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_refs.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-13 22:36:07 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-13 23:19:51 +0100
commitc230af9bccc3cadb373f9007ba14fffb6c2acc75 (patch)
tree575b9f1185f948e496c8660bd4c24e0474259d8a /libavcodec/h264_refs.c
parent15e7533ca1a1a5d6bf0b35cf67b9e0a0bae7ee27 (diff)
downloadffmpeg-c230af9bccc3cadb373f9007ba14fffb6c2acc75.tar.gz
h264: Reset last_pocs in case of reference or frame number inconsistencies
This prevents faulty increasing of has_b_frames Should fix Ticket 2062 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_refs.c')
-rw-r--r--libavcodec/h264_refs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index 8df4c3a7f0..7e4c3e21f7 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -287,7 +287,10 @@ int ff_h264_decode_ref_pic_list_reordering(H264Context *h){
for(list=0; list<h->list_count; list++){
for(index= 0; index < h->ref_count[list]; index++){
if (!h->ref_list[list][index].f.data[0]) {
+ int i;
av_log(h->s.avctx, AV_LOG_ERROR, "Missing reference picture, default is %d\n", h->default_ref_list[list][0].poc);
+ for (i=0; i<FF_ARRAY_ELEMS(h->last_pocs); i++)
+ h->last_pocs[i] = INT_MIN;
if (h->default_ref_list[list][0].f.data[0])
h->ref_list[list][index]= h->default_ref_list[list][0];
else