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

This commit is contained in:
Anton Khirnov 2024-06-03 11:35:39 +02:00
parent 3cd6492fb5
commit 90e75c4ec9
2 changed files with 0 additions and 5 deletions

View File

@ -3143,7 +3143,6 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal)
goto fail; goto fail;
} }
s->overlap ++;
ret = hevc_frame_start(s); ret = hevc_frame_start(s);
if (ret < 0) if (ret < 0)
return ret; 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->cur_frame = s->collocated_ref = NULL;
s->last_eos = s->eos; s->last_eos = s->eos;
s->eos = 0; s->eos = 0;
s->overlap = 0;
s->slice_initialized = 0; s->slice_initialized = 0;
/* split the input packet into NAL units, so we know the upper bound on the /* 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; continue;
ret = decode_nal_unit(s, nal); ret = decode_nal_unit(s, nal);
if (ret >= 0 && s->overlap > 2)
ret = AVERROR_INVALIDDATA;
if (ret < 0) { if (ret < 0) {
av_log(s->avctx, AV_LOG_WARNING, av_log(s->avctx, AV_LOG_WARNING,
"Error parsing NAL unit #%d.\n", i); "Error parsing NAL unit #%d.\n", i);

View File

@ -487,7 +487,6 @@ typedef struct HEVCContext {
int last_eos; ///< last packet contains an EOS/EOB NAL int last_eos; ///< last packet contains an EOS/EOB NAL
int bs_width; int bs_width;
int bs_height; int bs_height;
int overlap;
int is_decoded; int is_decoded;
// NoRaslOutputFlag associated with the last IRAP frame // NoRaslOutputFlag associated with the last IRAP frame