aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/cavsdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-05 03:51:08 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-05 03:51:08 +0100
commitbc1b828536cd0524e6ac6284d9aa2d41ee077b97 (patch)
tree43f67fd357431df1d27fdf1e3bbf703c81fa6851 /libavcodec/cavsdec.c
parent9ca32b2060ecaf625fb5679bd69c3f579ef03b95 (diff)
downloadffmpeg-bc1b828536cd0524e6ac6284d9aa2d41ee077b97.tar.gz
avcodec/cavsdec: use more specific error codes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cavsdec.c')
-rw-r--r--libavcodec/cavsdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index d4872b61af..ff726bbb02 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -566,7 +566,7 @@ static int decode_residual_block(AVSContext *h, GetBitContext *gb,
if (level_code >= ESCAPE_CODE) {
run = ((level_code - ESCAPE_CODE) >> 1) + 1;
if(run > 64)
- return -1;
+ return AVERROR_INVALIDDATA;
esc_code = get_ue_code(gb, esc_golomb_order);
level = esc_code + (run > r->max_run ? 1 : r->level_add[run]);
while (level > r->inc_limit)
@@ -893,7 +893,7 @@ static inline int decode_slice_header(AVSContext *h, GetBitContext *gb)
av_log(h->avctx, AV_LOG_ERROR, "unexpected start code 0x%02x\n", h->stc);
if (h->stc >= h->mb_height)
- return -1;
+ return AVERROR_INVALIDDATA;
h->mby = h->stc;
h->mbidx = h->mby * h->mb_width;