Skip to content

Commit

Permalink
libavcodec/h264_refs.c
Browse files Browse the repository at this point in the history
best source I could find:
Cumulated changes from previous sync
52be988#diff-9429ce52c81bb46d0a3f09a77ec81d3170ecf438b3f0e5a956cbffafca40c429
  • Loading branch information
ulmus-scott authored and bennettpeter committed Dec 3, 2021
1 parent f2886e2 commit d96a345
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mythtv/external/FFmpeg/libavcodec/h264_refs.c
Expand Up @@ -766,6 +766,14 @@ int ff_h264_execute_ref_pic_marking(H264Context *h)
h->short_ref[0] = h->cur_pic_ptr;
h->short_ref_count++;
h->cur_pic_ptr->reference |= h->picture_structure;

/* MythTV changes - begin */
// do not add more reference frames than allowed after seeing frame num gap
if (!mmco_count && h->short_ref_count > h->ps.sps->ref_frame_count) {
pic = h->short_ref[h->short_ref_count - 1];
remove_short(h, pic->frame_num, 0);
}
/* MythTV changes - end */
}
}

Expand Down

0 comments on commit d96a345

Please sign in to comment.