ons 2025-07-16 klockan 11:57 +0800 skrev Zhao Zhili:
> From: Zhao Zhili <zhiliz...@tencent.com>
> 
> Fix assert failure.
> Fix #11666.

Saw this ticket, but I was busy with other things and forgot about it

> @@ -2100,9 +2111,17 @@ static void
> mxf_write_index_table_segment(AVFormatContext *s)
>              avio_w8(pb, temporal_offset);

Maybe check TemporalOffset while we're at it? Though it probably can't
be outside the permissible range if KeyFrameOffset isn't

>              if ((mxf->index_entries[i].flags & 0x30) == 0x30) { //
> back and forward prediction
> +                int offset = mxf->last_key_index - i;
> +                err = mxf_check_keyframe_offset(s, offset);
> +                if (err < 0)
> +                    return err;
>                  sc->b_picture_count = FFMAX(sc->b_picture_count, i -
> prev_non_b_picture);
> -                avio_w8(pb, mxf->last_key_index - i);
> +                avio_w8(pb, offset);
>              } else {
> +                int offset = key_index - i;
> +                err = mxf_check_keyframe_offset(s, offset);
> +                if (err < 0)
> +                    return err;
>                  avio_w8(pb, key_index - i); // key frame offset

Why not avio_w8(offset) here also?

/Tomas
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to