[FFmpeg-cvslog] lavc/hevcdec: drop a useless condition
Anton Khirnov
git at videolan.org
Tue Jun 4 13:01:43 EEST 2024
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue May 28 18:33:54 2024 +0200| [79c0310acaf3b638cea2258b5b18b575668f250c] | committer: Anton Khirnov
lavc/hevcdec: drop a useless condition
hls_slice_data_wpp() is only called when num_entry_point_offsets>0
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=79c0310acaf3b638cea2258b5b18b575668f250c
---
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++) {
More information about the ffmpeg-cvslog
mailing list