summaryrefslogtreecommitdiff
path: root/libavcodec/vorbisdec.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2013-05-17 13:34:25 +0200
committerLuca Barbato <lu_zero@gentoo.org>2013-06-07 16:54:16 +0200
commit92b3caa1089b9495ae1afb842536f859a43ad9dc (patch)
tree552e61d54c4024f53bf33830f8da6ac51f68e771 /libavcodec/vorbisdec.c
parentaa2c918f7d1af168850174114d6aa4e43830bed6 (diff)
vorbis: return meaningful errors
Diffstat (limited to 'libavcodec/vorbisdec.c')
-rw-r--r--libavcodec/vorbisdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 80051b9493..25c5958063 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -1370,7 +1370,7 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc,
if (max_output > ch_left * vlen) {
av_log(vc->avctx, AV_LOG_ERROR, "Insufficient output buffer\n");
- return -1;
+ return AVERROR_INVALIDDATA;
}
av_dlog(NULL, " residue type 0/1/2 decode begin, ch: %d cpc %d \n", ch, c_p_c);
@@ -1621,7 +1621,7 @@ static int vorbis_parse_audio_packet(vorbis_context *vc, float **floor_ptr)
residue = &vc->residues[mapping->submap_residue[i]];
if (ch_left < ch) {
av_log(vc->avctx, AV_LOG_ERROR, "Too many channels in vorbis_floor_decode.\n");
- return -1;
+ return AVERROR_INVALIDDATA;
}
if (ch) {
ret = vorbis_residue_decode(vc, residue, ch, do_not_decode, ch_res_ptr, vlen, ch_left);