Mercurial > libavcodec.hg
comparison rv40.c @ 5994:625b4a680d41 libavcodec
Check decoded dimensions for validity
author | kostya |
---|---|
date | Fri, 07 Dec 2007 05:52:27 +0000 |
parents | 5dfff8f6f524 |
children | a33699306850 |
comparison
equal
deleted
inserted
replaced
5993:5dfff8f6f524 | 5994:625b4a680d41 |
---|---|
117 si->vlc_set = get_bits(gb, 2); | 117 si->vlc_set = get_bits(gb, 2); |
118 skip_bits1(gb); | 118 skip_bits1(gb); |
119 t = get_bits(gb, 13); /// ??? | 119 t = get_bits(gb, 13); /// ??? |
120 if(!si->type || !get_bits1(gb)) | 120 if(!si->type || !get_bits1(gb)) |
121 rv40_parse_picture_size(gb, &w, &h); | 121 rv40_parse_picture_size(gb, &w, &h); |
122 if(avcodec_check_dimensions(r->s.avctx, w, h) < 0) | |
123 return -1; | |
122 si->width = w; | 124 si->width = w; |
123 si->height = h; | 125 si->height = h; |
124 mb_size = ((w + 15) >> 4) * ((h + 15) >> 4); | 126 mb_size = ((w + 15) >> 4) * ((h + 15) >> 4); |
125 mb_bits = ff_rv34_get_start_offset(gb, mb_size); | 127 mb_bits = ff_rv34_get_start_offset(gb, mb_size); |
126 si->start = get_bits(gb, mb_bits); | 128 si->start = get_bits(gb, mb_bits); |