diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-04-09 19:45:10 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-04-09 19:45:10 +0000 |
commit | 440882f7bec203e9255c9de87468df0fa867d9d1 (patch) | |
tree | af05da244042d68c1c7d39fa8c885b4e4d8c564a /libavcodec/snow.c | |
parent | dc7f45a08e9f0a3f983b0fd5ce972fa4acc905ed (diff) | |
download | ffmpeg-440882f7bec203e9255c9de87468df0fa867d9d1.tar.gz |
Make sure spatial_decomposition_count is >0.
Originally committed as revision 18394 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/snow.c')
-rw-r--r-- | libavcodec/snow.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c index d246b9abf2..501b60dde4 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -3582,7 +3582,7 @@ static int decode_header(SnowContext *s){ s->always_reset= get_rac(&s->c, s->header_state); s->temporal_decomposition_type= get_symbol(&s->c, s->header_state, 0); s->temporal_decomposition_count= get_symbol(&s->c, s->header_state, 0); - GET_S(s->spatial_decomposition_count, tmp <= (unsigned)MAX_DECOMPOSITIONS) + GET_S(s->spatial_decomposition_count, 0 < tmp && tmp <= MAX_DECOMPOSITIONS) s->colorspace_type= get_symbol(&s->c, s->header_state, 0); s->chroma_h_shift= get_symbol(&s->c, s->header_state, 0); s->chroma_v_shift= get_symbol(&s->c, s->header_state, 0); @@ -3615,7 +3615,7 @@ static int decode_header(SnowContext *s){ memcpy(s->plane[2].hcoeff, s->plane[1].hcoeff, sizeof(s->plane[1].hcoeff)); } if(get_rac(&s->c, s->header_state)){ - GET_S(s->spatial_decomposition_count, tmp <= (unsigned)MAX_DECOMPOSITIONS) + GET_S(s->spatial_decomposition_count, 0 < tmp && tmp <= MAX_DECOMPOSITIONS) decode_qlogs(s); } } |