Revert "Packet header writing: set empty packet header bit to 0 when appropriate...
[openjpeg.git] / src / lib / openjp2 / t2.c
index 71472b499c5d487388613e5ca2174706d98a3008..bc0475b9c4f631b5a1b0afa9c49c32499dc5ee25 100644 (file)
@@ -797,8 +797,7 @@ static OPJ_BOOL opj_t2_encode_packet(OPJ_UINT32 tileno,
 
     /* Writing Packet header */
     band = res->bands;
-    for (bandno = 0; !packet_empty &&
-            bandno < res->numbands; ++bandno, ++band)      {
+    for (bandno = 0; bandno < res->numbands; ++bandno, ++band)      {
         opj_tcd_precinct_t *prc;
 
         /* Skip empty bands */
@@ -931,7 +930,7 @@ static OPJ_BOOL opj_t2_encode_packet(OPJ_UINT32 tileno,
 
     /* Writing the packet body */
     band = res->bands;
-    for (bandno = 0; !packet_empty && bandno < res->numbands; bandno++, ++band) {
+    for (bandno = 0; bandno < res->numbands; bandno++, ++band) {
         opj_tcd_precinct_t *prc;
 
         /* Skip empty bands */