[FFmpeg-cvslog] lavc/hevcdec: drop a redundant multiple-frame-per-packet check

Anton Khirnov git at videolan.org
Tue Jun 11 18:51:35 EEST 2024


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Jun  3 11:35:39 2024 +0200| [90e75c4ec9b0886a7b96482d2a4dc5e693ca15d1] | committer: Anton Khirnov

lavc/hevcdec: drop a redundant multiple-frame-per-packet check

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=90e75c4ec9b0886a7b96482d2a4dc5e693ca15d1
---

 libavcodec/hevc/hevcdec.c | 4 ----
 libavcodec/hevc/hevcdec.h | 1 -
 2 files changed, 5 deletions(-)

diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index a241e25196..b9aea45edb 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -3143,7 +3143,6 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal)
                 goto fail;
             }
 
-            s->overlap ++;
             ret = hevc_frame_start(s);
             if (ret < 0)
                 return ret;
@@ -3204,7 +3203,6 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length)
     s->cur_frame = s->collocated_ref = NULL;
     s->last_eos = s->eos;
     s->eos = 0;
-    s->overlap = 0;
     s->slice_initialized = 0;
 
     /* split the input packet into NAL units, so we know the upper bound on the
@@ -3271,8 +3269,6 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length)
             continue;
 
         ret = decode_nal_unit(s, nal);
-        if (ret >= 0 && s->overlap > 2)
-            ret = AVERROR_INVALIDDATA;
         if (ret < 0) {
             av_log(s->avctx, AV_LOG_WARNING,
                    "Error parsing NAL unit #%d.\n", i);
diff --git a/libavcodec/hevc/hevcdec.h b/libavcodec/hevc/hevcdec.h
index e47a7107c8..f0443b3ab9 100644
--- a/libavcodec/hevc/hevcdec.h
+++ b/libavcodec/hevc/hevcdec.h
@@ -487,7 +487,6 @@ typedef struct HEVCContext {
     int last_eos;  ///< last packet contains an EOS/EOB NAL
     int bs_width;
     int bs_height;
-    int overlap;
 
     int is_decoded;
     // NoRaslOutputFlag associated with the last IRAP frame



More information about the ffmpeg-cvslog mailing list