diff options
Diffstat (limited to 'src/framing.c')
-rw-r--r-- | src/framing.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/framing.c b/src/framing.c index 79fc715..ee29651 100644 --- a/src/framing.c +++ b/src/framing.c @@ -20,6 +20,10 @@ ********************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdlib.h> #include <limits.h> #include <string.h> @@ -723,8 +727,10 @@ long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og){ /* replace the computed checksum with the one actually read in */ memcpy(page+22,chksum,4); +#ifndef DISABLE_CRC /* Bad checksum. Lose sync */ goto sync_fail; +#endif } } @@ -1814,6 +1820,7 @@ int main(void){ test_pack(packets,headret,0,0,0); } +#ifndef DISABLE_CRC { /* test for the libogg 1.1.1 resync in large continuation bug found by Josh Coalson) */ @@ -1823,6 +1830,9 @@ int main(void){ fprintf(stderr,"testing continuation resync in very large packets... "); test_pack(packets,headret,100,2,3); } +#else + fprintf(stderr,"Skipping continuation resync test due to --disable-crc\n"); +#endif { /* term only page. why not? */ @@ -2084,6 +2094,7 @@ int main(void){ fprintf(stderr,"ok.\n"); } +#ifndef DISABLE_CRC /* Test recapture: page + garbage + page */ { ogg_page og_de; @@ -2125,6 +2136,9 @@ int main(void){ fprintf(stderr,"ok.\n"); } +#else + fprintf(stderr,"Skipping recapture test due to --disable-crc\n"); +#endif /* Free page data that was previously copied */ { |