diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-10-14 09:14:35 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-10-14 09:14:35 +0000 |
commit | 8f4020d8a4b2e6264f54accbcb881577316c3ca6 (patch) | |
tree | 4f0eff0e369f08a4206bf584dc5f385793d092e9 /libavcodec/svq1dec.c | |
parent | e2bf1082cc0dafe21be1a7dac6cf9900e7e162ba (diff) | |
download | ffmpeg-8f4020d8a4b2e6264f54accbcb881577316c3ca6.tar.gz |
svq1dec: check return value of get_bits1() in more common way
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/svq1dec.c')
-rw-r--r-- | libavcodec/svq1dec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index b5999d4a0a..8e4a4827bd 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -100,7 +100,7 @@ static const uint8_t string_table[256] = { break; \ } \ /* divide block if next bit set */ \ - if (get_bits1(bitbuf) == 0) \ + if (!get_bits1(bitbuf)) \ break; \ /* add child nodes */ \ list[n++] = list[i]; \ @@ -564,7 +564,7 @@ static int svq1_decode_frame_header(GetBitContext *bitbuf, MpegEncContext *s) } /* unknown fields */ - if (get_bits1(bitbuf) == 1) { + if (get_bits1(bitbuf)) { skip_bits1(bitbuf); /* use packet checksum if (1) */ skip_bits1(bitbuf); /* component checksums after image data if (1) */ @@ -572,13 +572,13 @@ static int svq1_decode_frame_header(GetBitContext *bitbuf, MpegEncContext *s) return AVERROR_INVALIDDATA; } - if (get_bits1(bitbuf) == 1) { + if (get_bits1(bitbuf)) { skip_bits1(bitbuf); skip_bits(bitbuf, 4); skip_bits1(bitbuf); skip_bits(bitbuf, 2); - while (get_bits1(bitbuf) == 1) + while (get_bits1(bitbuf)) skip_bits(bitbuf, 8); } |