Browse Source

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

Signed-off-by: James Almer <jamrial@gmail.com>
tags/n4.4
James Almer 5 years ago
parent
commit
2d02cf72e1
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      libavcodec/hevc_sei.c

+ 4
- 4
libavcodec/hevc_sei.c View File

@@ -169,7 +169,7 @@ static int decode_registered_user_data_closed_caption(HEVCSEIA53Caption *s, GetB
int ret; int ret;


if (size < 3) 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); 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; int country_code, provider_code;


if (size < 3) if (size < 3)
return AVERROR(EINVAL);
return AVERROR_INVALIDDATA;
size -= 3; size -= 3;


country_code = get_bits(gb, 8); 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; uint8_t application_identifier;


if (size < 3) if (size < 3)
return AVERROR(EINVAL);
return AVERROR_INVALIDDATA;
size -= 3; size -= 3;


provider_oriented_code = get_bits(gb, 16); 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; uint32_t user_identifier;


if (size < 4) if (size < 4)
return AVERROR(EINVAL);
return AVERROR_INVALIDDATA;
size -= 4; size -= 4;


user_identifier = get_bits_long(gb, 32); user_identifier = get_bits_long(gb, 32);


Loading…
Cancel
Save