Unified · Split
| @@ -73,7 +73,7 @@ int ff_parse_a53_cc(AVBufferRef **pbuf, const uint8_t *data, int size) · 72 unmodified lines | ||
| 73 | 73 | int ret, cc_count; |
| 74 | 74 | |
| 75 | 75 | if (size < 3) |
| 76 | − return AVERROR(EINVAL); | |
| 76 | + return AVERROR_INVALIDDATA; | |
| 77 | 77 | |
| 78 | 78 | ret = init_get_bits8(&gb, data, size); |
| 79 | 79 | if (ret < 0) |
| @@ -95,12 +95,12 @@ int ff_parse_a53_cc(AVBufferRef **pbuf, const uint8_t *data, int size) · 15 unmodified lines | ||
| 95 | 95 | |
| 96 | 96 | /* 3 bytes per CC plus one byte marker_bits at the end */ |
| 97 | 97 | if (cc_count * 3 >= (get_bits_left(&gb) >> 3)) |
| 98 | − return AVERROR(EINVAL); | |
| 98 | + return AVERROR_INVALIDDATA; | |
| 99 | 99 | |
| 100 | 100 | new_size = (old_size + cc_count * 3); |
| 101 | 101 | |
| 102 | 102 | if (new_size > INT_MAX) |
| 103 | − return AVERROR(EINVAL); | |
| 103 | + return AVERROR_INVALIDDATA; | |
| 104 | 104 | |
| 105 | 105 | /* Allow merging of the cc data from two fields. */ |
| 106 | 106 | ret = av_buffer_realloc(pbuf, new_size); |