add ffmpeg offcial bugfix

Signed-off-by: ziyu_gao <gaoziyu0614@outlook.com>
This commit is contained in:
ziyu_gao 2024-06-17 02:10:44 +00:00
parent 47fecec169
commit 64dd1de0b0
4 changed files with 6 additions and 6 deletions

View File

@ -1914,13 +1914,13 @@ static void hls_prediction_unit(HEVCContext *s, int x0, int y0,
if (current_mv.pred_flag & PF_L0) {
ref0 = refPicList[0].ref[current_mv.ref_idx[0]];
if (!ref0 || !ref0->frame->data[0])
if (!ref0 || !ref0->frame)
return;
hevc_await_progress(s, ref0, &current_mv.mv[0], y0, nPbH);
}
if (current_mv.pred_flag & PF_L1) {
ref1 = refPicList[1].ref[current_mv.ref_idx[1]];
if (!ref1 || !ref1->frame->data[0])
if (!ref1 || !ref1->frame)
return;
hevc_await_progress(s, ref1, &current_mv.mv[1], y0, nPbH);
}

View File

@ -1027,7 +1027,7 @@ static int decode_fctl_chunk(AVCodecContext *avctx, PNGDecContext *s,
return AVERROR_INVALIDDATA;
}
if ((sequence_number == 0 || !s->last_picture.f->data[0]) &&
if ((sequence_number == 0 || !s->last_picture.f) &&
dispose_op == APNG_DISPOSE_OP_PREVIOUS) {
// No previous frame to revert to for the first frame
// Spec says to just treat it as a APNG_DISPOSE_OP_BACKGROUND

View File

@ -1779,7 +1779,7 @@ static int showspectrumpic_request_frame(AVFilterLink *outlink)
int acc_samples = 0;
int dst_offset = 0;
while (nb_frame <= s->nb_frames) {
while (nb_frame < s->nb_frames) {
AVFrame *cur_frame = s->frames[nb_frame];
int cur_frame_samples = cur_frame->nb_samples;
int nb_samples = 0;

View File

@ -485,10 +485,10 @@ static MatchingInfo evaluate_parameters(AVFilterContext *ctx, SignatureContext *
continue; /* matching sequence is too short */
if ((double) goodfcount / (double) fcount < sc->thit)
continue;
if ((double) goodfcount*0.5 < FFMAX(gooda, goodb))
if ((double) goodfcount*0.5 <= FFMAX(gooda, goodb))
continue;
meandist = (double) goodfcount / (double) distsum;
meandist = (double) distsum / (double) goodfcount;
if (meandist < minmeandist ||
status == (STATUS_END_REACHED | STATUS_BEGIN_REACHED) ||