iron261 / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

bio->ct is unnecessarily set to zero in opj_bio_flush method #461

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the opj_bio_flush method,  bio->ct = 0 is not necessary, since 
the opj_bio_byteout call sets ct to either 7 or 8.

See snippets below:

OPJ_BOOL opj_bio_flush(opj_bio_t *bio) {
    bio->ct = 0;
    if (! opj_bio_byteout(bio)) {
        return OPJ_FALSE;
    }
.....

////////////////////////////////////////////

OPJ_BOOL opj_bio_byteout(opj_bio_t *bio) {
    bio->buf = (bio->buf << 8) & 0xffff;
    bio->ct = bio->buf == 0xff00 ? 7 : 8;
.....

Original issue reported on code.google.com by boxe...@gmail.com on 23 Dec 2014 at 3:33

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2987.

Original comment by m.darb...@gmail.com on 23 Dec 2014 at 4:05