1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

avcodec/hevc_refs: fix potential use of uninitialized min_idx

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2014-12-10 14:34:46 +01:00
parent 52a17972de
commit ae93965359

View File

@@ -173,7 +173,7 @@ int ff_hevc_output_frame(HEVCContext *s, AVFrame *out, int flush)
if ((frame->flags & HEVC_FRAME_FLAG_OUTPUT) && if ((frame->flags & HEVC_FRAME_FLAG_OUTPUT) &&
frame->sequence == s->seq_output) { frame->sequence == s->seq_output) {
nb_output++; nb_output++;
if (frame->poc < min_poc) { if (frame->poc < min_poc || nb_output == 1) {
min_poc = frame->poc; min_poc = frame->poc;
min_idx = i; min_idx = i;
} }