From: "Tomas Härdin" <git@haerdin.se> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: Ensure keyframe offset in valid range Date: Tue, 22 Jul 2025 13:43:09 +0200 Message-ID: <a93886df6cf96873abc7a58dd8605a38dada4160.camel@haerdin.se> (raw) In-Reply-To: <tencent_7D9E011969F67D26AE0E3865C1DDB4E8690A@qq.com> ons 2025-07-16 klockan 11:57 +0800 skrev Zhao Zhili: > From: Zhao Zhili <zhilizhao@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-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2025-07-22 11:43 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-07-16 3:57 Zhao Zhili 2025-07-21 17:24 ` Zhao Zhili 2025-07-22 11:43 ` Tomas Härdin [this message] 2025-07-22 16:32 ` [FFmpeg-devel] [PATCH v2] avformat/mxfenc: Ensure frame " Zhao Zhili
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=a93886df6cf96873abc7a58dd8605a38dada4160.camel@haerdin.se \ --to=git@haerdin.se \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git