diff mbox series

[FFmpeg-devel,02/39] lavc/hevcdec: simplify condition

Message ID 20240607130135.9088-2-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,01/39] lavc/hevcdec: do not free SliceHeader arrays in pic_arrays_free() | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov June 7, 2024, 1 p.m. UTC
---
 libavcodec/hevc/hevcdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index d317c1471a..43cbc45062 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -3115,7 +3115,7 @@  static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal)
                 ctb_addr_ts = hls_slice_data_wpp(s, nal);
             else
                 ctb_addr_ts = hls_decode_entry(s, &gb);
-            if (ctb_addr_ts >= (s->ps.sps->ctb_width * s->ps.sps->ctb_height)) {
+            if (ctb_addr_ts >= s->cur_frame->ctb_count) {
                 ret = hevc_frame_end(s);
                 if (ret < 0)
                     goto fail;