/* Initialize the marker reader module. This is called only once, when the decompression object is created.  */
jinit_marker_reader(j_decompress_ptr cinfo)
/* Initialize the marker reader module. This is called only once, when the decompression object is created.  */
jinit_marker_reader(j_decompress_ptr cinfo)
{
  my_marker_ptr marker;
  int i;
  marker = (my_marker_ptr)
    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
				SIZEOF(my_marker_reader));
  cinfo->marker = (struct jpeg_marker_reader *) marker;
  marker->pub.reset_marker_reader = reset_marker_reader;
  marker->pub.read_markers = read_markers;
  marker->pub.read_restart_marker = read_restart_marker;
  marker->process_COM = skip_variable;
  marker->length_limit_COM = 0;
  for (i = 0; i < 16; i++) {
    marker->process_APPn[i] = skip_variable;
    marker->length_limit_APPn[i] = 0;
  }
  marker->process_APPn[0] = get_interesting_appn;
  marker->process_APPn[14] = get_interesting_appn;
  reset_marker_reader(cinfo);
}