1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
7 #include "JBig2_Segment.h"
9 #include "../../../include/fxcrt/fx_memory.h"
11 CJBig2_Segment::CJBig2_Segment() {
14 m_nReferred_to_segment_count = 0;
15 m_pReferred_to_segment_numbers = NULL;
16 m_dwPage_association = 0;
18 m_dwHeader_Length = 0;
20 m_State = JBIG2_SEGMENT_HEADER_UNPARSED;
21 m_nResultType = JBIG2_VOID_POINTER;
24 CJBig2_Segment::~CJBig2_Segment() {
25 FX_Free(m_pReferred_to_segment_numbers);
27 switch (m_nResultType) {
28 case JBIG2_IMAGE_POINTER:
31 case JBIG2_SYMBOL_DICT_POINTER:
34 case JBIG2_PATTERN_DICT_POINTER:
37 case JBIG2_HUFFMAN_TABLE_POINTER: