aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2020-12-18 12:44:27 -0300
committerJames Almer <jamrial@gmail.com>2020-12-18 12:58:51 -0300
commit2d02cf72e1017cc617aca64ab5815ea1cb63f403 (patch)
treee33c306354752cff6949de7d2823c6c651054587
parentd397d98b5978c7e3b18b21b48658d7fcb7d7e546 (diff)
downloadffmpeg-2d02cf72e1017cc617aca64ab5815ea1cb63f403.tar.gz
avcodec/hevc_sei: return the correct error code on User Data Registered parsing failure
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/hevc_sei.c8
1 files 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);