~ubuntu-branches/debian/experimental/libav/experimental

« back to all changes in this revision

Viewing changes to libavcodec/rv30.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2014-01-18 15:46:55 UTC
  • mfrom: (1.1.24)
  • Revision ID: package-import@ubuntu.com-20140118154655-iz6u00yevkat1jqi
Tags: 6:10~alpha2-1
New Upstream release 10_alpha2. This upstream git snapshot has too many
changes to list here, cf. to the upstream Changelog:
http://git.libav.org/?p=libav.git;a=blob;f=Changelog;hb=refs/tags/v10_alpha2

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceInfo *si)
36
36
{
 
37
    AVCodecContext *avctx = r->s.avctx;
37
38
    int mb_bits;
38
39
    int w = r->s.width, h = r->s.height;
39
40
    int mb_size;
51
52
    si->pts = get_bits(gb, 13);
52
53
    rpr = get_bits(gb, r->rpr);
53
54
    if(rpr){
 
55
        if (avctx->extradata_size < rpr * 2 + 8) {
 
56
            av_log(avctx, AV_LOG_ERROR,
 
57
                   "Insufficient extradata - need at least %d bytes, got %d\n",
 
58
                   8 + rpr * 2, avctx->extradata_size);
 
59
            return AVERROR(EINVAL);
 
60
        }
 
61
 
54
62
        w = r->s.avctx->extradata[6 + rpr*2] << 2;
55
63
        h = r->s.avctx->extradata[7 + rpr*2] << 2;
56
64
    }
254
262
    }
255
263
    r->rpr = (avctx->extradata[1] & 7) >> 1;
256
264
    r->rpr = FFMIN(r->rpr + 1, 3);
257
 
    if(avctx->extradata_size - 8 < (r->rpr - 1) * 2){
258
 
        av_log(avctx, AV_LOG_ERROR, "Insufficient extradata - need at least %d bytes, got %d\n",
259
 
               6 + r->rpr * 2, avctx->extradata_size);
260
 
        return AVERROR(EINVAL);
261
 
    }
 
265
 
262
266
    r->parse_slice_header = rv30_parse_slice_header;
263
267
    r->decode_intra_types = rv30_decode_intra_types;
264
268
    r->decode_mb_info     = rv30_decode_mb_info;