diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-05-28 18:33:54 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-06-04 11:36:51 +0200 |
commit | 79c0310acaf3b638cea2258b5b18b575668f250c (patch) | |
tree | bf81131fd1a72a5427a093f125cfefe77db77a50 /libavcodec | |
parent | 74159cbfc30a0202b3c3d6f770143d0e1c30fa5a (diff) | |
download | ffmpeg-79c0310acaf3b638cea2258b5b18b575668f250c.tar.gz |
lavc/hevcdec: drop a useless condition
hls_slice_data_wpp() is only called when num_entry_point_offsets>0
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/hevcdec.c | 15 |
1 files 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++) { |