mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-19 22:10:34 +00:00
Check extradata size on resolution change.
Ignore resolution change if resolution not defined in extradata. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
parent
61e2e29691
commit
09c5f990bc
@ -51,6 +51,11 @@ static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn
|
|||||||
skip_bits1(gb);
|
skip_bits1(gb);
|
||||||
si->pts = get_bits(gb, 13);
|
si->pts = get_bits(gb, 13);
|
||||||
rpr = get_bits(gb, r->rpr);
|
rpr = get_bits(gb, r->rpr);
|
||||||
|
if (r->s.avctx->extradata_size < 8 + rpr*2) {
|
||||||
|
av_log(r->s.avctx, AV_LOG_WARNING,
|
||||||
|
"Extradata does not contain selected resolution\n");
|
||||||
|
rpr = 0;
|
||||||
|
}
|
||||||
if(rpr){
|
if(rpr){
|
||||||
w = r->s.avctx->extradata[6 + rpr*2] << 2;
|
w = r->s.avctx->extradata[6 + rpr*2] << 2;
|
||||||
h = r->s.avctx->extradata[7 + rpr*2] << 2;
|
h = r->s.avctx->extradata[7 + rpr*2] << 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user