h264_slice: Fix return of incomplete frames from decoder
authorJohn Stebbins <jstebbins@jetheaddev.com>
Wed, 27 Jun 2018 22:12:24 +0000 (15:12 -0700)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 28 Jun 2018 19:35:01 +0000 (21:35 +0200)
commit08b1d1d8122517d07f2335437cde0aeedc50143f
tree3e8e7b258253836fb47d802d8abb14f25cde20cd
parent872ea3dfe565098570ad213a6f1eb00a805aec5d
h264_slice: Fix return of incomplete frames from decoder

When not using libavformat for demuxing, AVCodecContext.has_b_frames
gets set too late causing the recovery frame heuristic in h264_refs to
incorrectly flag an early frame as recovered.

This patch sets has_b_frames earlier to prevent improperly flagging the
frame as recovered.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/h264_slice.c