[FFmpeg-cvslog] avcodec/hevc_sei: return the correct error code on User Data Registered parsing failure

James Almer git at videolan.org
Fri Dec 18 18:14:38 EET 2020


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Fri Dec 18 12:44:27 2020 -0300| [2d02cf72e1017cc617aca64ab5815ea1cb63f403] | committer: James Almer

avcodec/hevc_sei: return the correct error code on User Data Registered parsing failure

Signed-off-by: James Almer <jamrial at gmail.com>

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

 libavcodec/hevc_sei.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c
index 6c3bb231d2..a62b8bead3 100644
--- a/libavcodec/hevc_sei.c
+++ b/libavcodec/hevc_sei.c
@@ -169,7 +169,7 @@ static int decode_registered_user_data_closed_caption(HEVCSEIA53Caption *s, GetB
     int ret;
 
     if (size < 3)
-       return AVERROR(EINVAL);
+       return AVERROR_INVALIDDATA;
 
     ret = ff_parse_a53_cc(&s->buf_ref, gb->buffer + get_bits_count(gb) / 8, size);
 
@@ -241,7 +241,7 @@ static int decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEI *s, GetBitConte
     int country_code, provider_code;
 
     if (size < 3)
-        return AVERROR(EINVAL);
+        return AVERROR_INVALIDDATA;
     size -= 3;
 
     country_code = get_bits(gb, 8);
@@ -271,7 +271,7 @@ static int decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEI *s, GetBitConte
         uint8_t application_identifier;
 
         if (size < 3)
-            return AVERROR(EINVAL);
+            return AVERROR_INVALIDDATA;
         size -= 3;
 
         provider_oriented_code = get_bits(gb, 16);
@@ -286,7 +286,7 @@ static int decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEI *s, GetBitConte
         uint32_t user_identifier;
 
         if (size < 4)
-            return AVERROR(EINVAL);
+            return AVERROR_INVALIDDATA;
         size -= 4;
 
         user_identifier = get_bits_long(gb, 32);



More information about the ffmpeg-cvslog mailing list