summaryrefslogtreecommitdiff
path: root/libavcodec/rv40.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-19 10:51:19 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-19 10:54:07 +0100
commitc1ff2cdbca2b46a1f4089977463d45811e388b1a (patch)
tree742b1f5161a9ab2d9c54878e0d10720192eac8aa /libavcodec/rv40.c
parentf144e4ddff11a1f355d2f9381cad04c66dbf55d1 (diff)
parent0f532fd3f9b9ca974cea0feb8ddcaf4a7f3b23c5 (diff)
downloadffmpeg-c1ff2cdbca2b46a1f4089977463d45811e388b1a.tar.gz
Merge commit '0f532fd3f9b9ca974cea0feb8ddcaf4a7f3b23c5'
* commit '0f532fd3f9b9ca974cea0feb8ddcaf4a7f3b23c5': rv40: Return more meaningful error codes Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rv40.c')
-rw-r--r--libavcodec/rv40.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c
index 043fd724a9..e9cd110928 100644
--- a/libavcodec/rv40.c
+++ b/libavcodec/rv40.c
@@ -130,22 +130,23 @@ static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn
int mb_bits;
int w = r->s.width, h = r->s.height;
int mb_size;
+ int ret;
memset(si, 0, sizeof(SliceInfo));
if(get_bits1(gb))
- return -1;
+ return AVERROR_INVALIDDATA;
si->type = get_bits(gb, 2);
if(si->type == 1) si->type = 0;
si->quant = get_bits(gb, 5);
if(get_bits(gb, 2))
- return -1;
+ return AVERROR_INVALIDDATA;
si->vlc_set = get_bits(gb, 2);
skip_bits1(gb);
si->pts = get_bits(gb, 13);
if(!si->type || !get_bits1(gb))
rv40_parse_picture_size(gb, &w, &h);
- if(av_image_check_size(w, h, 0, r->s.avctx) < 0)
- return -1;
+ if ((ret = av_image_check_size(w, h, 0, r->s.avctx)) < 0)
+ return ret;
si->width = w;
si->height = h;
mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);