Revert "Packet header writing: set empty packet header bit to 0 when appropriate...
authorCarl Hetherington <cth@carlh.net>
Mon, 1 Jan 2018 23:57:07 +0000 (23:57 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 7 Jun 2020 22:37:18 +0000 (00:37 +0200)
This reverts commit 2609fb8077125b5b31f1bcc2f98c12ff1e6572d7.

I am testing this reversion to see if it fixes problems with DCP
playback on various systems (DCP-o-matic bug #1136).

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 */