avcodec/aacps: Return more specific error codes.
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 31 Dec 2018 17:16:52 +0000 (18:16 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 1 Jan 2019 20:11:47 +0000 (21:11 +0100)
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/aacps.c

index b16c339..d5dca64 100644 (file)
@@ -118,7 +118,7 @@ static int read_ ## PAR ## _data(AVCodecContext *avctx, GetBitContext *gb, PSCon
     return 0; \
 err: \
     av_log(avctx, AV_LOG_ERROR, "illegal "#PAR"\n"); \
-    return -1; \
+    return AVERROR_INVALIDDATA; \
 }
 
 READ_PAR_DATA(iid,    huff_offset[table_idx],    0, FFABS(ps->iid_par[e][b]) > 7 + 8 * ps->iid_quant)