2
2
// This software is released under the 2-Clause BSD license, included
3
3
// below.
4
4
//
5
- // Copyright (c) 2019, Aous Naman
5
+ // Copyright (c) 2019, Aous Naman
6
6
// Copyright (c) 2019, Kakadu Software Pty Ltd, Australia
7
7
// Copyright (c) 2019, The University of New South Wales, Australia
8
- //
8
+ //
9
9
// Redistribution and use in source and binary forms, with or without
10
10
// modification, are permitted provided that the following conditions are
11
11
// met:
12
- //
12
+ //
13
13
// 1. Redistributions of source code must retain the above copyright
14
14
// notice, this list of conditions and the following disclaimer.
15
- //
15
+ //
16
16
// 2. Redistributions in binary form must reproduce the above copyright
17
17
// notice, this list of conditions and the following disclaimer in the
18
18
// documentation and/or other materials provided with the distribution.
19
- //
19
+ //
20
20
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
21
21
// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22
22
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
@@ -57,7 +57,9 @@ namespace ojph {
57
57
// //////////////////////////////////////////////////////////////////////////
58
58
codestream::~codestream ()
59
59
{
60
- if (state) delete state;
60
+ if (state)
61
+ delete state;
62
+ state = NULL ;
61
63
}
62
64
63
65
// //////////////////////////////////////////////////////////////////////////
@@ -66,6 +68,13 @@ namespace ojph {
66
68
state = new local::codestream;
67
69
}
68
70
71
+ // //////////////////////////////////////////////////////////////////////////
72
+ void codestream::restart ()
73
+ {
74
+ assert (state != NULL );
75
+ state->restart ();
76
+ }
77
+
69
78
// //////////////////////////////////////////////////////////////////////////
70
79
param_siz codestream::access_siz ()
71
80
{
@@ -103,7 +112,7 @@ namespace ojph {
103
112
}
104
113
105
114
// //////////////////////////////////////////////////////////////////////////
106
- void codestream::set_tilepart_divisions (bool at_resolutions,
115
+ void codestream::set_tilepart_divisions (bool at_resolutions,
107
116
bool at_components)
108
117
{
109
118
ui32 value = 0 ;
@@ -147,7 +156,7 @@ namespace ojph {
147
156
}
148
157
149
158
// //////////////////////////////////////////////////////////////////////////
150
- void codestream::write_headers (outfile_base *file,
159
+ void codestream::write_headers (outfile_base *file,
151
160
const comment_exchange* comments,
152
161
ui32 num_comments)
153
162
{
0 commit comments