svq1dec: check return value of get_bits1() in more common way

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2012-10-14 09:14:35 +00:00
parent e2bf1082cc
commit 8f4020d8a4

View File

@ -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);
}