From: Anton Khirnov <anton@khirnov.net> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 02/11] lavc/hevcdec: drop a useless condition Date: Fri, 31 May 2024 19:47:40 +0200 Message-ID: <20240531174804.17572-2-anton@khirnov.net> (raw) In-Reply-To: <20240531174804.17572-1-anton@khirnov.net> hls_slice_data_wpp() is only called when num_entry_point_offsets>0 --- libavcodec/hevcdec.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index ad2cbd7ece..d3715f9de7 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -2742,16 +2742,15 @@ static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal) s->sh.offset[i - 1] = offset; } - if (s->sh.num_entry_point_offsets != 0) { - offset += s->sh.entry_point_offset[s->sh.num_entry_point_offsets - 1] - cmpt; - if (length < offset) { - av_log(s->avctx, AV_LOG_ERROR, "entry_point_offset table is corrupted\n"); - return AVERROR_INVALIDDATA; - } - s->sh.size[s->sh.num_entry_point_offsets - 1] = length - offset; - s->sh.offset[s->sh.num_entry_point_offsets - 1] = offset; + offset += s->sh.entry_point_offset[s->sh.num_entry_point_offsets - 1] - cmpt; + if (length < offset) { + av_log(s->avctx, AV_LOG_ERROR, "entry_point_offset table is corrupted\n"); + return AVERROR_INVALIDDATA; } + s->sh.size[s->sh.num_entry_point_offsets - 1] = length - offset; + s->sh.offset[s->sh.num_entry_point_offsets - 1] = offset; + s->data = data; for (i = 1; i < s->threads_number; i++) { -- 2.43.0 _______________________________________________ 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:[~2024-05-31 17:48 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-05-31 17:47 [FFmpeg-devel] [PATCH 01/11] lavc/hevcdec: move handling of byte alignment at the end of slice header Anton Khirnov 2024-05-31 17:47 ` Anton Khirnov [this message] 2024-05-31 17:47 ` [FFmpeg-devel] [PATCH 03/11] lavc/hevcdec: include first row in SliceHeader.offset/size Anton Khirnov 2024-05-31 17:47 ` [FFmpeg-devel] [PATCH 04/11] lavc/hevcdec: drop HEVCLocalContext.gb Anton Khirnov 2024-05-31 17:47 ` [FFmpeg-devel] [PATCH 05/11] lavc/hevcdec: drop HEVCContext.HEVClc Anton Khirnov 2024-05-31 17:47 ` [FFmpeg-devel] [PATCH 06/11] lavc/hevcdec: rename HEVCContext.ref to cur_frame Anton Khirnov 2024-05-31 17:47 ` [FFmpeg-devel] [PATCH 07/11] lavc/hevcdec: rename HEVCFrame.frame to just f Anton Khirnov 2024-05-31 17:47 ` [FFmpeg-devel] [PATCH 08/11] lavc/hevcdec: drop HEVCContext.frame Anton Khirnov 2024-05-31 17:47 ` [FFmpeg-devel] [PATCH 09/11] lavc/hevc*: move to hevc/ subdir Anton Khirnov 2024-06-02 0:39 ` James Almer 2024-06-02 6:50 ` Anton Khirnov 2024-05-31 17:47 ` [FFmpeg-devel] [PATCH 10/11] lavc/hevcdec: deduplicate calling hwaccel decode_params() Anton Khirnov 2024-05-31 17:47 ` [FFmpeg-devel] [PATCH 11/11] lavc/hevcdec: drop unused HEVCContext.width/height Anton Khirnov 2024-05-31 19:11 ` Vittorio Giovara
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=20240531174804.17572-2-anton@khirnov.net \ --to=anton@khirnov.net \ --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