diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-06-26 14:41:41 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-07-02 09:55:39 +0200 |
commit | e939f02ce67f2af570115214d2d5a6d93501dd80 (patch) | |
tree | 51bae26c8eb9c87418266ca0a98308db5ef0ede0 /libavcodec/hevc/hevcdec.c | |
parent | 5861576f39c8b40dabaf5d5d7e37b2e8eec51535 (diff) | |
download | ffmpeg-e939f02ce67f2af570115214d2d5a6d93501dd80.tar.gz |
lavc/hevcdec: improve check for PPS changing between slices
Compare actual PPS objects rather than just PPS ID, as the former might
change while the latter stays the same.
Reported-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/hevc/hevcdec.c')
-rw-r--r-- | libavcodec/hevc/hevcdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index 01d32086f2..fd143cddab 100644 --- a/libavcodec/hevc/hevcdec.c +++ b/libavcodec/hevc/hevcdec.c @@ -603,7 +603,7 @@ static int hls_slice_header(SliceHeader *sh, const HEVCContext *s, GetBitContext av_log(s->avctx, AV_LOG_ERROR, "PPS id out of range: %d\n", pps_id); return AVERROR_INVALIDDATA; } - if (!sh->first_slice_in_pic_flag && pps_id != sh->pps_id) { + if (!sh->first_slice_in_pic_flag && s->ps.pps_list[pps_id] != s->pps) { av_log(s->avctx, AV_LOG_ERROR, "PPS changed between slices.\n"); return AVERROR_INVALIDDATA; } |