[FFmpeg-cvslog] hevc/sei: return INVALIDDATA when a referenced SPS is not available

Hendrik Leppkes git at videolan.org
Wed Sep 4 19:36:14 EEST 2024


ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Fri Aug 30 12:55:38 2024 +0200| [d4cfbf329c7090f81dc835423aeaae102343b505] | committer: Hendrik Leppkes

hevc/sei: return INVALIDDATA when a referenced SPS is not available

The code previously returned ENOMEM, despite this not being an
allocation problem, but rather a bitstream problem referring to data not
currently available.

Fixes playback of such streams, as it allows further processing of NAL
units after skipping the broken SEI NAL.

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

 libavcodec/hevc/sei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/hevc/sei.c b/libavcodec/hevc/sei.c
index e39ac0c38a..b55ba71a8d 100644
--- a/libavcodec/hevc/sei.c
+++ b/libavcodec/hevc/sei.c
@@ -56,7 +56,7 @@ static int decode_nal_sei_pic_timing(HEVCSEI *s, GetBitContext *gb,
     const HEVCSPS *sps = ps->sps_list[s->active_seq_parameter_set_id];
 
     if (!sps)
-        return(AVERROR(ENOMEM));
+        return AVERROR_INVALIDDATA;
 
     if (sps->vui.frame_field_info_present_flag) {
         int pic_struct = get_bits(gb, 4);



More information about the ffmpeg-cvslog mailing list