Commit ae939653 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/hevc_refs: fix potential use of uninitialized min_idx

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 52a17972
......@@ -173,7 +173,7 @@ int ff_hevc_output_frame(HEVCContext *s, AVFrame *out, int flush)
if ((frame->flags & HEVC_FRAME_FLAG_OUTPUT) &&
frame->sequence == s->seq_output) {
nb_output++;
if (frame->poc < min_poc) {
if (frame->poc < min_poc || nb_output == 1) {
min_poc = frame->poc;
min_idx = i;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment