diff mbox series

[FFmpeg-devel,4/8] avcodec/atsc_a53: use AVERROR_INVALIDDATA

Message ID 1634216942-20329-4-git-send-email-lance.lmwang@gmail.com
State Accepted
Commit cd38fbf4f7992dec59da6f76344e6e6c1826efea
Headers show
Series [FFmpeg-devel,1/8] avfilter/af_replaygain: use fabsf() instead of fabs()
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Limin Wang Oct. 14, 2021, 1:08 p.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavcodec/atsc_a53.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/atsc_a53.c b/libavcodec/atsc_a53.c
index 2d89ef5..29ec71b 100644
--- a/libavcodec/atsc_a53.c
+++ b/libavcodec/atsc_a53.c
@@ -73,7 +73,7 @@  int ff_parse_a53_cc(AVBufferRef **pbuf, const uint8_t *data, int size)
     int ret, cc_count;
 
     if (size < 3)
-        return AVERROR(EINVAL);
+        return AVERROR_INVALIDDATA;
 
     ret = init_get_bits8(&gb, data, size);
     if (ret < 0)
@@ -95,12 +95,12 @@  int ff_parse_a53_cc(AVBufferRef **pbuf, const uint8_t *data, int size)
 
     /* 3 bytes per CC plus one byte marker_bits at the end */
     if (cc_count * 3 >= (get_bits_left(&gb) >> 3))
-        return AVERROR(EINVAL);
+        return AVERROR_INVALIDDATA;
 
     new_size = (old_size + cc_count * 3);
 
     if (new_size > INT_MAX)
-        return AVERROR(EINVAL);
+        return AVERROR_INVALIDDATA;
 
     /* Allow merging of the cc data from two fields. */
     ret = av_buffer_realloc(pbuf, new_size);