summaryrefslogtreecommitdiff
path: root/libavcodec/h264_refs.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-07-05 14:36:03 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-07-05 14:36:03 +0000
commit3d5421201ba21d108adc0c76458300ea425114a9 (patch)
treed3f2f43784064ba0434abc54ee0f1f4a3468301e /libavcodec/h264_refs.c
parent733f5990d0600589782bcfa5c9e22a9391c6c19e (diff)
Perform sliding window operation during frame gap handling.
This avoids some warnings about too many reference frames. Originally committed as revision 24057 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264_refs.c')
-rw-r--r--libavcodec/h264_refs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index 7caa4b0003..74eaaa8ada 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -478,6 +478,7 @@ void ff_generate_sliding_window_mmcos(H264Context *h) {
MpegEncContext * const s = &h->s;
assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count);
+ h->mmco_index= 0;
if(h->short_ref_count && h->long_ref_count + h->short_ref_count == h->sps.ref_frame_count &&
!(FIELD_PICTURE && !s->first_field && s->current_picture_ptr->reference)) {
h->mmco[0].opcode= MMCO_SHORT2UNUSED;